Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public function search($query)
  2. {
  3. $meetings_table = $this->db->dbprefix('meetings');
  4. $companies_table = $this->db->dbprefix('companies');
  5.  
  6. $this->db->select('*');
  7. $this->db->from($this->_table);
  8. $this->db->from($meetings_table);
  9. $this->db->like($this->_table.'.name', $query, 'both');
  10. $this->db->like($meetings_table.'.name', $query, 'both');
  11.  
  12. $users = $this->db->get();
  13. $user_results = array();
  14. foreach ($users->result() as $user)
  15. {
  16. $user_results[] = $user;
  17. }
  18.  
  19. //$results = array_merge($user_results, $meeting_results);
  20.  
  21. return $user_results;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement