>Hi,
>
>I'm using PHP to connect and perform queries with a MySQL database.  I've 
>noticed that it there is an error performing certain
>commands like 'mysql_connect()', I'll get a warning message in the browser.
>
>I'd like to suppress these messages as I am storing the error, 
>mysql_error(), in an array.  So if there is an error, I would simply
>display the contents of the array in a nice format.
>
>Is this possible?

<?php
  $connection = @mysql_connect(...) or $errors[] = mysql_error();
?>

The @ symbol will suppress *ALL* error messages.  Even if you screw up and
type myslq_connect or something equally bone-headed.  Be aware of that.

Code first without the @'s, and then sprinkle them in as needed. :-)

-- 
Like Music?  http://l-i-e.com/artists.htm
I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
major distro).  Need to record live events (mixed already) to stereo
CD-quality.  Soundcard Recommendations?
Software to handle the recording? Don't need fancy mixer stuff.  Zero (0)
post-production time.  Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
audio-to-disk.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to