您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

判断存在记录,并加锁防止其他进程新增或者更新

2025/10/1 10:42:02发布16次查看
项目中一段保存配置weixinappid代码,都来吐几句吧 无 /** * 判断是否有$company_id公司的微信配置,并加锁,防止其他进程更新新增 */ public function exists_weixin_config_and_add_row_lock($company_id){ return $this-db-query( 'select exists( select
项目中一段保存配置weixin appid代码,都来吐几句吧 /** * 判断是否有$company_id公司的微信配置,并加锁,防止其他进程更新新增 */ public function exists_weixin_config_and_add_row_lock($company_id){ return $this->db->query( 'select exists( select * from weixin_config where company_id = ? for update ) as has', array($company_id))->row()->has == 1; }
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product