db_smartone = $this->load->database("onedev", true); } public function search() { $prm = $this->sys_input; $qry = "%" . $prm["qry"] . '%'; $sql = "Select CorporateID, CorporateName from corporate where CorporateName like ? and CorporateIsActive = 'Y' limit 0,30"; $query = $this->db_smartone->query($sql, array($qry)); if ($query) { $rows = $query->result_array(); $rows[] = array("CorporateID" => 0, "CorporateName" => "Semua"); $result = array("data" => $rows); $this->sys_ok($result); } else { $this->sys_error_db("", $this->db_smartone); exit; } } }