Sunday, October 10, 2010

PHP - @mysql_query vs. mysql_query

Don't you ever wonder the difference between @mysql_query vs. mysql_query, like I do? What does the "@" symbol do in here? Here is what I find out:

If error reporting is set to *show*, the @ symbol before a function call will prevent the error from displaying.

However, for MySQL, it would show the syntax error only. To display MYSQL returned errors, you would need to use mysql_error() or mysql_errno() functions.

Little details like above is always helpful... :)

No comments:

Post a Comment