Jump to content


Photo

Probably as silly question but i am learning all the time!!


  • Please log in to reply
3 replies to this topic

#1 glenelkins

glenelkins
  • Members
  • PipPipPip
  • Advanced Member
  • 760 posts
  • LocationBridlington - East Riding of Yorkshire - United Kingdom

Posted 08 August 2006 - 06:59 PM

Hi

Iv wondered ever since I started coding PHP, and now to be honest I am pretty damn good at it. THough like most people you need to ask questions and read things if your unsure..only natural; which i find this website great for by the way!

Anyway, what the hell do some of you put "@" for in front of things, for example iv seen a post with $varname = @mysql_query(
what does the "@" do???
http://thewebsolutionprovider.com - A Solution For Everything Web!

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 08 August 2006 - 07:05 PM

error reporting supression - it means if there is an error there no warning will be printed to the screen - I only use this on lines that are not critical to the scripts completion.
follow me on twitter @PHPsycho

#3 glenelkins

glenelkins
  • Members
  • PipPipPip
  • Advanced Member
  • 760 posts
  • LocationBridlington - East Riding of Yorkshire - United Kingdom

Posted 08 August 2006 - 07:05 PM

Ah ok, not my ideal way of programming, I always add error handlers....for everything!! lol  ;D
http://thewebsolutionprovider.com - A Solution For Everything Web!

#4 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 08 August 2006 - 08:38 PM

If you always handle the errors youself then it could be a good idea to use the "@" as will suppress the default error messages output by the PHP processor.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users