[PHP-DB] About mysql_connect()

2008-02-06 Thread Prabath Kumarasinghe
Hi All When I stop mysql database whole application will break in mysql_connect() function even without giving any error message.Is there are any way to put exception handling with mysql_connect() function. Cheers Prabath ___

RE: [PHP-DB] About mysql_connect()

2008-02-06 Thread Bastien Koert
i use if (!($conn=mysql_connect($host, $username, $pwd))) {notify("error connecting to DB");die(); }else{ return $conn; } in a function bastien > Date: Wed, 6 Feb 2008 02:07:11 -0800> From: [EMAIL PROTECTED]> To: > php-db@lists.php.net> Subject: [PHP-DB] About m

RE: [PHP-DB] About mysql_connect()

2008-02-06 Thread Lasitha Alawatta
Pls refer http://www.php.net/mysql_connect -Original Message- From: Prabath Kumarasinghe [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 2:07 PM To: php-db@lists.php.net Subject: [PHP-DB] About mysql_connect() Hi All When I stop mysql database whole application will b

Re: [PHP-DB] About mysql_connect()

2008-02-06 Thread js
Use PDO and try/catch. I think it's much easier. On Feb 6, 2008 7:07 PM, Prabath Kumarasinghe <[EMAIL PROTECTED]> wrote: > Hi All > > When I stop mysql database whole application will > break in mysql_connect() function even without giving > any error message.Is there are any way to put > exceptio

Re: [PHP-DB] About mysql_connect()

2008-02-06 Thread Stut
On 6 Feb 2008, at 14:45, js wrote: Use PDO and try/catch. I think it's much easier. Easier than checking the return value for FALSE? OP: The manual is your friend, it tells you exactly how to detect failures from any function. http://php.net/mysql_connect -Stut -- http://stut.net/ On Feb

Re: [PHP-DB] About mysql_connect()

2008-02-06 Thread Prabath Kumarasinghe
Hi All It works.Thank you all, for the support. Cheers Prabath --- Stut <[EMAIL PROTECTED]> wrote: > On 6 Feb 2008, at 14:45, js wrote: > > Use PDO and try/catch. > > I think it's much easier. > > Easier than checking the return value for FALSE? > > OP: The manual is your friend, it tells y