News for hackers. Stuff that matters.
Re:PHP: The Right Way by kellishaver on Saturday July 07, 2012 @06:01PM (#4212867)
With parametrized queries, that becomes a non-issue, but I still see no point in cluttering the database with data that's just going to be filtered out at some point - might as well filter it before it goes into the DB to begin with. The exception, of course, being those rare cases when some users need to see the filtered data and others need to see the raw data, but even then, you likely won't want to allow everything.
Re:PHP: The Right Way by silentworks on Saturday July 07, 2012 @06:08PM (#4212885)
I am not sure if you are referring to the same sort of filtering mentioned in the document. The data is filtered before it hits the database layer, this saves resource being used.
Re:PHP: The Right Way by kellishaver on Sunday July 08, 2012 @02:57AM (#4213939)
That's what I meant. I just kind of articulated it poorly, my apologies.
Re:PHP: The Right Way by xd on Saturday July 07, 2012 @06:44PM (#4212953)
Parametized queries are just another way of filtering input ..
Re:PHP: The Right Way by mtts on Sunday July 08, 2012 @03:13AM (#4213969)
No they're not. They're a method for ensuring that what is meant to go into some field in some database actually ends up there and does not start doing things it should not be doing.
Re:PHP: The Right Way by kellishaver on Sunday July 08, 2012 @02:55AM (#4213936)
Yes, but on the site, they make a clear distinction between parametrized queries with PDO and other types of input filtering. I misunderstood and thought you were referring specifically to the latter.