Saved X
Google login
SignUp with Email
X

Search query codeigniter

theindreshverma ( Edited  Sep 01, 12:55 am )
Login

In model

function search_data() {
   $this->db->like('title', 'match');
   $this->db->order_by('id', 'DESC');
   return $this->db->get('from_table', 5);

   // WHERE `title` LIKE '%match%'
   // 5 is limit
}

Sourcecode Tags

More Sourcecodes

More Sourcecodes