function getAllNewStudent($search, $start, $limit) { $sql_rs = $this->sqlGetNewStudent($search) . " LIMIT " . $start . ", " . $limit; if ($limit == 'All') { $sql_rs = $this->sqlGetNewStudent($search); } $sql_count = $this->sqlGetNewStudent(); if (!empty($search)) { $sql_count = $this->sqlGetNewStudent($search); } $_db = new Application_Model_DbTable_DbGlobal(); return $_db->getGlobalResultList($sql_rs, $sql_count); }
function getAllServiceType($search, $start, $limit) { $sql_rs = $this->sqlServiceType($search) . " LIMIT " . $start . ", " . $limit; if ($limit == 'All') { $sql_rs = $this->sqlServiceType($search); } $sql_count = $this->sqlServiceType(); if (!empty($search)) { $sql_count = $this->sqlServiceType($search); } $_db = new Application_Model_DbTable_DbGlobal(); return $_db->getGlobalResultList($sql_rs, $sql_count); // return array(0=>$rows,1=>$_count);//get all result by param 0 ,get count record by param 1 }