select('*')->from('tpl_order_tab') ->where('status')->eq(1) ->andWhere('close_ts')->ge(strtotime($startTime)) ->andWhere('close_ts')->lt(strtotime($endTime)) ->count(); $list = daoInst()->select('*')->from('tpl_order_tab') ->where('status')->eq(1) ->andWhere('close_ts')->ge(strtotime($startTime)) ->andWhere('close_ts')->lt(strtotime($endTime)) ->limit($start . "," . $pageSize) ->fetch_array(); $array = new stdClass(); $array->total = $count; $array->rows = $list; echo json_encode($array);