Page 1 of 1
[SOLVED]What does @ means in front of mysql_query
Posted: Tue Oct 05, 2004 8:15 am
by Calimero
Had one of these in my scripts - for spliting 100 recirds into 10 pages.
What does this do?
Posted: Tue Oct 05, 2004 8:19 am
by Draco_03
Error supression, that's it.
...
Posted: Tue Oct 05, 2004 8:20 am
by Calimero
Me and my english are not sure about the meaning:
is it - preventing of showing errors,
or correcting them ?!?!?!
Posted: Tue Oct 05, 2004 8:25 am
by Draco_03
preventing to show them..

Posted: Tue Oct 05, 2004 8:26 am
by Breckenridge
It does not fix errors. It simply prevents your script from reporting errors to your browser.
...
Posted: Tue Oct 05, 2004 8:28 am
by Calimero
And how does this exactly help me or someone currently on my site - if the error happens.
Don't see the point of it !?!?
Posted: Tue Oct 05, 2004 8:30 am
by Draco_03
It's more a security thing. You don't want to output things in browser that could help someone hack you database, for exemple..
...
Posted: Tue Oct 05, 2004 8:33 am
by Calimero
A-ha,
from that point of view...,
Ok.
Thanks for the edu session

.
Posted: Tue Oct 05, 2004 8:34 am
by Draco_03
hehe your welcome

Posted: Tue Oct 05, 2004 8:47 am
by twigletmac
When you use @ whilst developing, don't forget to set some sort of error handling otherwise you could have an irritating time trying to debug funky code, or die() statements are pretty handy, e.g.:
Code: Select all
$result = mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');
Mac