CodeIgniter Forums
Strange Happenings - 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: Strange Happenings (/showthread.php?tid=52711)



Strange Happenings - El Forum - 06-23-2012

[eluser]james182[/eluser]
Has anyone had this happen to them.

backslashes get added in, how to get rid of them?

Code:
SELECT * FROM (`DB_TABLE`) WHERE `colour` IN ('\'D\','\'E\',\'F\'')



Strange Happenings - El Forum - 06-23-2012

[eluser]InsiteFX[/eluser]
Did you try Active Record?
Code:
$colour = array('D', 'E', 'F');
$this->db->where_in('colour', $colour);
$query = $this->db->get('DB_TABLE');
echo $this->db->last_query();