Cutom string in where statement - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cutom string in where statement (/showthread.php?tid=14941) |
Cutom string in where statement - El Forum - 01-21-2009 [eluser]zovar[/eluser] CI user guide says that we can use custom strings in $this->db->where(): Code: $where = "name='Joe' AND status='boss' OR status='active'"; My string is as follows Code: $where = " tag='test' OR tag='test1' "; i get the following error Code: A Database Error Occurred as you can seen the first where statement gets escaped... Cutom string in where statement - El Forum - 01-21-2009 [eluser]zovar[/eluser] OK, i think I have figured this out. There is a third parameter in where() which disables the backticks. where($string, NULL, FALSE) Cutom string in where statement - El Forum - 08-05-2009 [eluser]Unknown[/eluser] Thanks! That information helped alot |