Richard Lynch wrote:
I found out that new mysqli doesn't throw an exception during it's construction. The way I figured out how to deal with it was to do this:On Fri, January 5, 2007 4:35 pm, Jochem Maas wrote: $db =@ new mysqli('localhost', 'user', 'badpass', 'test'); With this in place no warning messages are displayed and then I can follow it up with a check for any errors using mysqli_connect_errno(). I was a little surprised to see it not use an exception as I thought that would be a better mechanism to know something is wrong when dealing with objects. Either way, it was a simple fix. I just want to thank Fernando Chure for pointing me in the right direction. --
| ||||||||||||||
- Re: [PHP] How to suppress error messages when using 'new ... Richard Lynch
- Re: [PHP] How to suppress error messages when using '... Richard Lynch
- Re: [PHP] How to suppress error messages when usi... Richard Morris

