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

I'm reading the 1.6.0 docs for escaping database values:

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?

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.

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

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