Monday, April 27, 2009

mysql_real_escape_string() is not working properly

Is the function mysql_real_escape_string() return a empty value for you? or does it not work properly as you expected.
The most common mistake is the use of the mysql_real_escape_string() before a database connection.
Make sure you use the function after a successful database connection.

If E_WARNING error level is enabled in your error_reporting you will get a E_WARNING for this mistake. It's always a good idea to make error_reporting E_ALL in the development cycle.

Read the Notes section for more details.

No comments:

Post a Comment