Re: user_error() default error type

From: Date: Sat, 10 Mar 2001 01:06:33 +0000
Subject: Re: user_error() default error type
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43261@lists.php.net to get a copy of this message
I dunno what the big deal is with typing a few more letters, but... define('E', E_USER_ERROR); mysql_query($q) or trigger_error(mysql_error()." in ".$q,E); -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Christian Dechery <lemming@vento.com.br> Newsgroups: php.general Sent: Wednesday, February 28, 2001 10:15 AM Subject: [PHP] user_error() default error type > Can't I change the default value for error type in user_error or trigger_error? > > I wanted to echo an error everytime a query failed because of syntax errors > so I'd to something like: > > $q="select * from bogustable"; > mysql_query($q) or trigger_error(mysql_error()." in ".$q,E_USER_ERROR); > -----------------> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > kinda BIG don't u think? > > > this would do exactly what I need when an query fails cuz of syntax error: > - echoes the error, the query and the line of code > - stop the execution of the script > > I NEED all of those, and that E_USER_ERROR in every call is making that > function call get huge. Isn't there a way I can't default it to that > instead of E_USER_NOTICE (which doesn't really help)... > ____________________________ > . Christian Dechery (lemming) > . http://www.tanamesa.com.br > . Gaita-L Owner / Web Developer > > > -- > 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 (#43261) next »