db_onedev = $this->load->database("onedev", true); } public function add_notes($orderid){ } function getdataselect(){ if (! $this->isLogin) { $this->sys_error("Invalid Token"); exit; } $rows = []; $query =" SELECT 0 as M_BranchID, 'Semua' as M_BranchName UNION SELECT M_BranchID, M_BranchName FROM m_branch WHERE M_BranchIsActive = 'Y'"; //echo $query; $rows['branchs'] = $this->db_onedev->query($query)->result_array(); $result = array( "total" => count($rows) , "records" => $rows, ); $this->sys_ok($result); exit; } }