How to use LIKE query in CodeIgnitor when select data from database? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to use LIKE query in CodeIgnitor when select data from database? (/showthread.php?tid=20051) |
How to use LIKE query in CodeIgnitor when select data from database? - El Forum - 06-26-2009 [eluser]PEN Vannak[/eluser] Dear CodeIgnitor Members, I want to use the query LIKE to select the data from database: Example: Code: SELECT * FROM my_table WHERE name LIKE '%hello%'; How can I use this query in CodeIgnitor? Thanks. How to use LIKE query in CodeIgnitor when select data from database? - El Forum - 06-26-2009 [eluser]Dam1an[/eluser] I'm assuming you're refering to using ActiveRecord? You can start by reading the User Guide Code: $this->db->like('title', 'match'); Thats all there is to it How to use LIKE query in CodeIgnitor when select data from database? - El Forum - 06-26-2009 [eluser]PEN Vannak[/eluser] Thank you very much! |