db ->select('SQL_CALC_FOUND_ROWS *', FALSE) ->order_by('reg_datetime DESC') ->get('board') ->result_array(); $return['totalCount'] = (int)$this->db->query("SELECT FOUND_ROWS() AS cnt")->row(0)->cnt; $this->response($return, 200); } }