getDbConnection()->createCommand("select count(*) as count from student_target_university where status=1 and school_id={$schoolId}".$condition)->queryRow(); $pages['total']=$totalQuery['count']; $pages['totalPage']=ceil($totalQuery['count']/$pageLimit); $pages['page']=$page; $data = $this->getDbConnection()->createCommand(" select * from student_target_university where school_id={$schoolId} and status=1 {$condition} order by create_time desc limit {$offset},{$pageLimit} ")->queryAll(); $return['pages']=$pages; $return['dataList']=$data; return $return; } }