PHP开发 SQL中in查询在Oracle中出现超过1000的问题,PHP使用array_chunk处理
$tmp_uids=array_chunk($uids,900); $diabetes_project=new Tdiabetes_project(); $whereStr=''; foreach ($tmp_uids as $k=>$v){ $whereStr.= " id in ('".implodeFor8("','",$v)."') or"; } $...
折雨的天空
1 分钟阅读
$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对数组进行拆分。
评论
0成为第一个留下想法的人。