Re: PEAR difficulties

From: Date: Thu, 06 Feb 2003 20:52:35 +0000
Subject: Re: PEAR difficulties
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-3637@lists.php.net to get a copy of this message
On Thu, 6 Feb 2003 13:35:51 -0700 "Jacob Marble" <jacobmarble@landez.com> wrote: > Now it returns: > db_pgsql > > What does that mean? That means: "Congratulations, you´ve hit the jackpot! The DSN you´ve provided has lead to a successful connect!". It´s only the short form :-) Nah, it just means that the object that you´ve passed to get_class() is an object of a class called "db_pgsql". That is a good thing, because it means that you´ve successfully invoked PEAR::DB´s PostgreSQL driver, which could not have happened if the connect had failed. That´s also why you´ve received an error - $db is an object of the db_pgsql class, which doesn´t have a method called getMessage(). Only objects of the PEAR_Error class (or its children) have this method. That´s why you need to check if an error has occured or not, before assuming that you can continue to work with the object in one way or another. Regards, Markus -- Markus Wolff <wolff@21st.de>

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