Re: Any way to asked the DB if it's connected?

From: Date: Thu, 08 Apr 2004 21:04:23 +0000
Subject: Re: Any way to asked the DB if it's connected?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11753@lists.php.net to get a copy of this message
Mike Zornek wrote:
I'd like to get a Boolean response from the database object after asking it if it's currently connected to the database. Is there a way to do this? ~ Mike ----- Mike Zornek Web Designer, Media Developer, Programmer and Geek Personal site: <http://MikeZornek.com> New Project: <http://WebDevWiki.com>
If you're using PEAR DB then if you get a PEAR_Error from the DB::connect call, it failed. $db = DB::connect($dsn); if(PEAR::isError($db)) { die($db->getMessage); } -- paperCrane <Justin Patrin>

« previous php.pear.general (#11753) next »