Welcome Guest, Not a member yet? Register   Sign In
Find words form same column in Database (Search)
#4

(10-20-2015, 10:38 PM)ardavan Wrote: thanks for your help. i just needed to add


PHP Code:
$this->db->where('STATUS','Live'); 
before


PHP Code:
$this->db->or_like('TITLE'$words[$i]); 

You could also do this:

PHP Code:
        $this->db->from('table')
            ->group_start()
                ->like('title''php')
                ->or_like('title''codeigniter')
            ->group_end()
        ->where('status''live');
        echo $this->db->get_compiled_select(); 
Reply


Messages In This Thread
RE: Find words form same column in Database (Search) - by pdthinh - 10-20-2015, 11:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB