• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Prepared statements and SQL injection

jjones

Lifer
I'm using prepared statements with some of my data manipulation on a MySQL database. Up to this point, I've always been using the real_escape_string function but everything I've read about using prepared statements says this is no longer necessary due to the separation of logic.

I need to be careful with this project regarding SQL injection. I take as many pre-emptive measures as possible with various data validation techniques and then using the real_escape_string function as the last line of defense. I'm reluctant to let this last line of defense go but then again, I don't want to do any unnecessary processing of data.

Has any one run across any problems or identified any weaknesses using prepared statements and forgoing the use of the real_escape_string function?
 
Thanks. Yeah, I had just read that article, along with several others discussing this; that's what got me on to using prepared statements.
 
Back
Top