您的位置:首页 > 编程语言 > PHP开发

数据条数过大时,分片采集

2016-03-22 15:55 567 查看
$start = 0;
$step = 100;
$limit = count($kdtIdArr);
$team = [];
while($start < $limit){
$ids = array_slice($kdtIdArr, $start, $step);
$team[] = $this->model->getTeamList($adminId, $ids, $page, $type, $perpage);
$start += $step;
}
$teams = empty($team) ? [] : call_user_func_array('array_merge', $team);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  php