Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. public function search($query)
  2.     {
  3.         $this->db->select('*');
  4.         $this->db->from('acid_users');
  5.         $this->db->like('acid_users.name', $query, 'both');
  6.         $this->db->join('acid_meetings', '');
  7.         $this->db->like('acid_meetings.company_name', $query, 'both');
  8.         $q = $this->db->get();
  9.        
  10.         $results = array();
  11.         foreach ($q->result() as $result)
  12.         {
  13.             $results[] = $result;
  14.         }
  15.         return $results;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement