Well, here's the story. I have been learning PHP since last March, so I'm relatively new to the whole thing. When I learned how to use MySQL with PHP, my possibilities started to open up drastically. Almost immediately, I began to develop my first content management system as a website I was working on. Since then, I have expanded that CMS to three different websites, and I have used upwards of about 500 mysql_query() functions across the three sites.
Then I learned about SQL injections and the importance of sanitization (the source from which I learned about MySQL queries in PHP did not mention injections at all). So, is there any way I can apply a mysql_real_escape_string() to ALL of my sql queries without going through thousands of lines of code? It's a fairly routine operation, and it seems like something a "site-wide find and replace" with RegEx support should be able to fix.
Ideas, anyone? I would really appreciate your help, because the prospect of the task ahead is not inviting.
Thanks,
Trevor