折雨的天空
SQL中in查询在Oracle中出现超过1000的问题,PHP使用array_chunk处理
2022-11-7 我好笨
$tmp_uids=array_chunk($uids,900);
$diabetes_project=new Tdiabetes_project();
$whereStr='';
foreach ($tmp_uids as $k=>$v){
$whereStr.= " id in ('".implodeFor8("','",$v)."') or";
}
$whereStr=rtrim($whereStr,'or');
$diabetes_project->whereAdd($whereStr);










array_chunk可以按length对数组进行拆分。

发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容