Re: need better solution

From: Date: Wed, 14 Feb 2001 16:19:07 +0000
Subject: Re: need better solution
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39659@lists.php.net to get a copy of this message
What version of PHP are you using? If there's a syntax error in our statements, it stops execution, just like ASP. There are error_reporting levels you can play with, and have errors trigger certain functions to handle the errors gracefully. Christian Dechery wrote: > I need a better solution for reporting SQL errors. > > I'm used to work with ASP, and whenever a query has a syntax error, it stops > the script and reports the error as if it was a compile error. This is very > usefull, but int PHP it doesn't work like that, I know. > > I came with a function query_error() that I call after each query, that > prints out the query, the error and the line... so I need to call it like > this. > > if(!$rs) query_error($query,__LINE__); > > but having to writ this down after EVERY single query, along with the __LINE__ > thing can get very boring, does anyone has a better solution? > > . [ Christian Dechery ] > . Webdeveloper @ Tá Na Mesa! > . Listmaster @ Gaita-L > . http://www.tanamesa.com.br > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#39659) next »