note 3413 deleted from mysql_query by danbeck

From: Date: Thu, 07 Sep 2000 17:18:09 +0000
Subject: note 3413 deleted from mysql_query by danbeck
Groups: php.notes 
Request: Send a blank email to php-notes+get-4422@lists.php.net to get a copy of this message
The example shown above outputs a ugly error message... OR DIE("Invalid query"); Those who want to check if the query worked, in a IF statement, without doing this should do the following: <pre> $query = @mysql_query(" ... "); if($query) { echo "It worked!"; } elseif(!$query) { echo "It did not work."; } </pre> The @ is used before mysql_query() is used to make the function "silent", so it will not output any unwanted error messages.

« previous php.notes (#4422) next »