CodeIgniter Forums
$this->db->query question - 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: $this->db->query question (/showthread.php?tid=54151)



$this->db->query question - El Forum - 08-25-2012

[eluser]Unknown[/eluser]
Hi there,
i have a problem, i use query binding for use procedures, like: $this->db->query("call addSomething(?,?);", array(true, 0));
But i have an problem, because the 'true', and '0' are inside of ' ', and with this mysql detect it like an string and not a boolean and integer...is someway to fix this? Or just have to write manual the params?

Or it's better use mysql convertions?

Best regards,
pjm


$this->db->query question - El Forum - 08-25-2012

[eluser]Aken[/eluser]
Any query bindings are automatically escaped. There is currently no option to disable this. You'll either need to write out the query fully yourself, or choose an Active Record solution if one can be managed for what you need to do.