CodeIgniter Forums
Strange Happenings - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Strange Happenings (/thread-52711.html)



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();