RE: [PHP] Function to catch all mySQL errors?
| From: | Michael J. Pawlowsky | Date: | Sun, 05 Jan 2003 02:55:52 +0000 |
| Subject: | RE: [PHP] Function to catch all mySQL errors? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130296@lists.php.net to get a copy of this message | ||
Also if you dont want ot to break you need to add the "@" operator in front
Mike
*********** REPLY SEPARATOR ***********
On 04/01/2003 at 6:47 PM Adam Plocher wrote:
>This encoded message has been converted to an attachment.
>
>How about something like this..
>
>function runquery($query)
>{
> $query = mysql_query($query);
> if (mysql_error())
> {
> echo "<div style=\"color:red\">MySQL Error: ". mysql_error()
>."</div>\n";
> exit(1);
> }
>
> return $query;
>}
>