MySQL Real Escape String

I always escape MySQL statement parameters from PHP using the function mysql_real_escape_string(), even after I have groomed them. One thing that I always forget is that this function will not work if you have not established a database connection. Without a database connection it returns nothing. If you have error reporting turned on, you will get a database connection error on the line that you are calling the mysql_real_escape_string() function.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • Reddit
  • Furl
  • NewsVine
  • Simpy
  • Slashdot
  • Spurl
  • StumbleUpon
  • YahooMyWeb
  • TailRank

Home | MySQL | MySQL Real Escape String