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. Link to comment https://forums.phpfreaks.com/topic/5476-mysql_query-vs-mysql_query/ 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 Link to comment https://forums.phpfreaks.com/topic/5476-mysql_query-vs-mysql_query/#findComment-19633 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. Link to comment https://forums.phpfreaks.com/topic/5476-mysql_query-vs-mysql_query/#findComment-19635 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.