Welcome Guest, Not a member yet? Register   Sign In
Database in 1.6.0
#1

[eluser]BlueCamel[/eluser]
I'm reading the 1.6.0 docs for escaping database values:
http://ellislab.com/codeigniter/user-gui...eries.html

For $this->db->escape_str($data) and $this->db->escape($data), the docs say that it adds single quotes around the data so you don't have to.

For mysql on 1.6.0 with php 5.2.3, this doesn't appear to be the case. Is this a doc bug or a code bug?
#2

[eluser]BlueCamel[/eluser]
Actually, more testing shows that $this-db->escape_str($data) is what fails. The $this->db->escape($data) always returns the data as a quoted value.
#3

[eluser]Derek Jones[/eluser]
Double check the docs, there, BlueCamel. escape() will escape and quote your data, escape_str() will merely escape it.
#4

[eluser]BlueCamel[/eluser]
True enough. To much focus on my own code and not enough on how to use CI. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB