Welcome Guest, Not a member yet? Register   Sign In
special chars in mysql query
#3

[eluser]Aken[/eluser]
Quotes are the only characters there that you need to worry about when included inside a string, unless you are using a search function (such as LIKE queries), in which you need to pay attention to characters such as % and _

If you use $this->db->query() alone, without the bindings array as the second parameter, your query will NOT be automatically escaped.

One step I think you might want to do is to typecast your strings/data - it's possible that the Database class is assuming your string is numeric or something else based on its content.

Pasting an example of a query you're using, as well as the an error and an example of the query CI is using (can be retrieved using $this->db->last_query()), we can be more specific about how to solve your problem.


Messages In This Thread
special chars in mysql query - by El Forum - 07-31-2011, 07:07 AM
special chars in mysql query - by El Forum - 07-31-2011, 09:38 AM
special chars in mysql query - by El Forum - 07-31-2011, 05:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB