Welcome Guest, Not a member yet? Register   Sign In
DB queries NOT failing when they should.
#2

[eluser]Aken[/eluser]
This is normal behavior. CI interprets the bogus ID as a string and passes it accordingly (it has no idea what your DB structure is, it just does what it's told). MySQL doesn't do strict type comparisons when it comes to WHERE clauses, so the string is simply "not found" and no results are returned.

I'm unsure if there's an option you can enable in MySQL. A quick Google search didn't yield anything helpful.

You should sanitize/check the ID prior to sending it to your query.


Messages In This Thread
DB queries NOT failing when they should. - by El Forum - 12-06-2012, 04:02 AM
DB queries NOT failing when they should. - by El Forum - 12-06-2012, 04:14 AM
DB queries NOT failing when they should. - by El Forum - 12-06-2012, 04:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB