Strange database issue when WHERE contains brackets - 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: Strange database issue when WHERE contains brackets (/showthread.php?tid=33535) |
Strange database issue when WHERE contains brackets - El Forum - 08-30-2010 [eluser]LinkFox[/eluser] Hello, Getting a very strange issue where I am querying against a database for a name for the ID. The query is something like this. (removed table names for security reasons) SELECT xx_id FROM (xx s) JOIN ss b ON b.xx_id = s.xx_id WHERE s.deleted !=1 AND s.xx_id =100 AND s.aaa ='xxx (xxxxx)' When the s.aaa contains ( ) the query through CI will return an empty result set. When I dump the query using last_query() and run that query in phpmyadmin I get the correct ID back...does anyone know how to get around this? or what the issue could be. Thanks in advance. Strange database issue when WHERE contains brackets - El Forum - 08-30-2010 [eluser]tzi0[/eluser] How you executing your query? Try $this->db->query($your_query,$false) |