php - how to search two or more database tables using mysql like clause in codeigniter -


this question has answer here:

public function dosearch2 ($string){         $this->db->like('printer.features', $string);         $this->db->or_like('printer.model', $string);          $query = $this->db->get("printer,scanner",12,$this->uri->segment(3));          return $query->result_array();     } 

i trying perform simple search across 3 tables in 1 database. using codeigniter query builder class. want know how use clause search 2 fields in both tables similar string. example:

searchword= inkjet; database= office; 3 tables  printers 

scanners laptops how search these 3 tables searchword.

you need join 3 tables first or condition.
not provide code because lesson
if learn it. welcome


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -