0
点赞
收藏
分享

微信扫一扫

1582 Incorrect parameter count in the call to native function 'FIND_IN_SET'

米小格儿 2022-05-09 阅读 107

此错误提示:

PDOException in Connection.php line 687

SQLSTATE[42000]: Syntax error or access violation: 1582 Incorrect parameter count in the call to native function 'FIND_IN_SET'

错误原因:

在使用FIND_IN_SET时传入的参数错误;

例如:错误代码:

   $where[]=['','exp',Db::raw("FIND_IN_SET('1,2,3','2,4,5,6')")];

正确:

   $where[]=['','exp',Db::raw("FIND_IN_SET('2', '2,4,5,6')")];



多个字符串 查询如何实现呢?


foreach($branch as $v){

     $where1[]=['','exp',Db::raw("FIND_IN_SET($v,n.equip_area_ids_list)")];

}



__________________________________________________________________________________

若有帮助到您,欢迎点击推荐,您的支持是对我坚持最好的肯定(*^_^*)

你要保守你心,胜过保守一切。

作者:刘俊涛的博客​​




举报

相关推荐

0 条评论