Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How is @mysql_query different from mysql_query ?

Status
Not open for further replies.

john99999

Instructor
Apr 29, 2005
73
US
What does the @ mean in front of mysql_query?
and
How is @mysql_query different from mysql_query ?

 
The '@' infront of any PHP statement surpresses any error messages that the statement may incur.

There is no difference between mysql_query() and @mysql_query() except for the above.

Ken
 
From the PHP online manual:


I have found that use of the "@" error-control operator is, in general, a bad idea. This from the above page:

PHP online manual said:
Currently the "@" error-control operator prefix will even disable error reporting for critical errors that will terminate script execution. Among other things, this means that if you use "@" to suppress errors from a certain function and either it isn't available or has been mistyped, the script will die right there with no indication as to why.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top