You are here: Re: @mysql_query - whats the difference between this and mysql_query? « PHP SQL « IT news, forums, messages
Re: @mysql_query - whats the difference between this and mysql_query?

Posted by J.O. Aho on 10/02/78 11:39

d wrote:
> <r-jones@orange.net> wrote in message
> news:1139487169.480653.33110@z14g2000cwz.googlegroups.com...
>> Sorry for the simplicity of the question, but im a newbie.
>>
>> Iv seen the mysql_query command written with an @ before it on some
>> example codes. What, if any, is the difference? And if they are
>> different, when should you use the @ and what does it do?
>>
>> Cheers
>
> Prefixing a function with an @ will hide any error message generated by the
> function. If a function will possibly fail, you can prefix it with the @,
> then check the return value to see if the function did infact work or not.
> It's kind of like a basic version of try/catch. Very basic. :)

It's quite useful if you have enabled error output to the php generated page
and there is something you don't want to the user to see, but of course in
that case it's better to turn off the error output and save errors to a log
file instead.


//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация