Advertisement
ak47suk1

Untitled

May 26th, 2011
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1.     function searchCourseOutline() {
  2.         $searchMe = $this->uri->segment(3);
  3.         $sortBy = $this->uri->segment(4);
  4.         if (!empty($searchMe)) {
  5.             $this->db->select('co_id,co_faculty,co_name,co_code');
  6.             $this->db->from('eloki_co');
  7.             $this->db->like($sortBy, $searchMe);
  8.             $this->db->like('co_approvalstatus',1);
  9.             $this->db->order_by($sortBy, "asc");
  10. $q = $this->db->get();
  11.             if ($q->num_rows() > 0) {
  12.                 foreach ($q->result() as $row) {
  13.                     $data[] = $row;
  14.                 }
  15.  
  16.                 return $data;
  17.             }
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement