Re: [PHP-DB] About mysql_connect()
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 you exactly > how to detect > failures from any function. > http://php.net/mysql_connect > > -Stut > > -- > http://stut.net/ > > > 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 > >> exception handling with mysql_connect() function. > >> > >> Cheers > >> > >> Prabath > >> > >> > >> > >> > >> > >> > > >> Looking for last minute shopping deals? > >> Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > >> > >> -- > >> PHP Database Mailing List (http://www.php.net/) > >> To unsubscribe, visit: > http://www.php.net/unsub.php > >> > >> > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: > http://www.php.net/unsub.php > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] About mysql_connect()
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 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 exception handling with mysql_connect() function. Cheers Prabath Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] About mysql_connect()
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 > exception handling with mysql_connect() function. > > Cheers > > Prabath > > > > > > > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] About mysql_connect()
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 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 Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php DOTW DISCLAIMER: This e-mail and any attachments are strictly confidential and intended for the addressee only. If you are not the named addressee you must not disclose, copy or take any action in reliance of this transmission and you should notify us as soon as possible. If you have received it in error, please contact the message sender immediately. This e-mail and any attachments are believed to be free from viruses but it is your responsibility to carry out all necessary virus checks and DOTW accepts no liability in connection therewith. This e-mail and all other electronic (including voice) communications from the sender's company are for informational purposes only. No such communication is intended by the sender to constitute either an electronic record or an electronic signature or to constitute any agreement by the sender to conduct a transaction by electronic means. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] About mysql_connect()
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 mysql_connect()> > 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> > > > > > > > > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping> > -- > > PHP Database Mailing List (http://www.php.net/)> To unsubscribe, visit: > http://www.php.net/unsub.php> _
[PHP-DB] About mysql_connect()
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 Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php