When going through tutorials and samples of other people code I have noticed a small variance in mysql_query syntax. In some cases a @ symbol is placed before a mysql function, but I cannot tell any difference that it makes being there. Here is an example:
$sql = "SELECT * FROM monkeys";
$result = @;
while( $row = @mysql_fetch_array($result) ){
//do something
}
verses:
$sql = "SELECT * FROM monkeys";
$result = mysql_query;
while( $row = mysql_fetch_array($result) ){
//do something
}
Can some one please tell me the difference between the two practices and why one would be perferred in a given situation.
thanks