Database Error!! - 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: Database Error!! (/showthread.php?tid=28203) Pages:
1
2
|
Database Error!! - El Forum - 03-05-2010 [eluser]Shaileen[/eluser] ok...i got that point.. but how do i write this line in CI.. it is originally in perl..thats where im geting confused.. WHERE lower($searchField) LIKE lower('%$searchText%') $groupSearch AND is it something like this?? $this->db->where("$searchField like", "%$searchText%"); $this->db->where($searchGroup, $groupSearch); or a different solution!!?? Database Error!! - El Forum - 03-05-2010 [eluser]danmontgomery[/eluser] Those three variables could hold any of a thousand different values, you're going to have to be more specific. read the userguide, specifically the section on $this->db->like(). Database Error!! - El Forum - 03-05-2010 [eluser]Shaileen[/eluser] ok..i got it.. this soloved my problem!!! if($groupSearch != '' ) { $this->db->where($groupSearch ); } thanks for your help.. |