db_onedev = $this->load->database("onedev", true); } public function lookup() { $query = " SELECT M_PreOrderStatusID as id, M_PreOrderStatusName as name, M_PreOrderStatusColor as color FROM one_preorder_dev.m_preorderstatus WHERE M_PreOrderStatusIsActive = 'Y'"; $rows = $this->db_onedev->query($query)->result_array(); $result = array( "total" => count($rows) , "records" => $rows, ); $this->sys_ok($result); exit; } }