mysql_real_escape more than once
问题 I was just wondering whether it makes a difference if I mysql_real_escape data more than once? So if I escaped data in one part of my website, and then again in another part of code. Would this be a problem? Or make a difference? 回答1: Yes. You'd get extra unnecessary backslashes. 回答2: The right place for mysql_real_escape is right before you send the query to save the data. Every other instance anywhere else in the script is a major design flaw. That should preferably in an own db-class of