PHP完全自学手册(珍藏版) 中文pdf扫描版下载
$find_query = "SELECT * FROM business WHERE status='Enabled' ";
$query = Business::findBySql($find_query);
//$query = Business::find()->where(['status' => 'Enabled']);
$countQuery = count($query->all());
$pages = new Pagination(['totalCount' => $countQuery, 'defaultPageSize' => 10]);
$data_rows = $query->offset($pages->offset)
->limit($pages->limit)
->all();
转载请注明:谷谷点程序 » yii2原生态sql操作