If I have:
$currentquery = @mysql_query("Blah blah");
What does the '@' symbol in front of the function name do?
Thanks.
It suppresses any errors that might arise from the function.
Don't use it if you can help it.
http://michelf.com/weblog/2005/bad-uses-of-the-at-operator/
JamesBrauman;10883400 wrote:If I have: $currentquery = @mysql_query("Blah blah"); What does the '@' symbol in front of the function name do? Thanks.
It suppresses any errors that might occur. For example, with @, the sql query may be malformed. PHP would not return that error. AS a rule of thumb, never use these unless you know you can recover from an expected error.
PHP Manual explains more