Welcome Guest, Not a member yet? Register   Sign In
How to output SQL statement with Active Record
#5

[eluser]GeoffL[/eluser]
[quote author="Aken" date="1312027608"]All values passed to the where() method are escaped automatically. You're effectively double escaping, which is why you're getting the quotes and slashes in your query. You should only need to pass the post value.[/quote]
Thanks - I'd missed that and only spotted the bit that says that it's a good idea to escape everything before submitting it into your database. That said, I wouldn't have expected any number of escapes to introduce quotes that weren't present in the input value!


Messages In This Thread
How to output SQL statement with Active Record - by El Forum - 07-29-2011, 04:08 PM
How to output SQL statement with Active Record - by El Forum - 07-29-2011, 06:58 PM
How to output SQL statement with Active Record - by El Forum - 07-30-2011, 12:42 AM
How to output SQL statement with Active Record - by El Forum - 07-30-2011, 01:06 AM
How to output SQL statement with Active Record - by El Forum - 07-30-2011, 02:28 AM
How to output SQL statement with Active Record - by El Forum - 08-01-2011, 01:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB