ryel01 Posted March 22, 2006 Share Posted March 22, 2006 Hello!I was wondering if anyone could explain what the difference is between using:mysql_query($query)and@mysql_query($query)?Thanks!Regan. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 22, 2006 Share Posted March 22, 2006 The "@" symbol supresses error messages and shouldn't be used when developing code. I feel it shouldn't be used at all except in cases where you know you can safely ignore all errors that could result from the line preceded by the symbol. Always write your scripts defensively -- assume the worst and write code that will work correctly.Ken Quote Link to comment Share on other sites More sharing options...
wickning1 Posted March 22, 2006 Share Posted March 22, 2006 I never use @, I just turn error_reporting down when a script is ready to go live. Generally you don't want users to see error messages because they look ugly and provide information about your application that could potentially be used to hack you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.