Re: MDB2 error _doQuery

From: Date: Mon, 13 Nov 2006 00:59:17 +0000
Subject: Re: MDB2 error _doQuery
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25794@lists.php.net to get a copy of this message
On 11/11/06, Alain Roger <raf.news@gmail.com> wrote:
error message is MDB2::Error Unknown
And what does $err->getUserInfo() say? Please respond to the mailing list.
On 11/11/06, Justin Patrin <papercrane@gmail.com> wrote: On 11/11/06, Alain Roger <raf.news@gmail.com> wrote:
Hi, I'm still working on the issue with MDB2. i've checked the $mdb2 object and i discover that method doQuery does
not
exist when i write $mdb2-> So it seems that MDB2.php does not pickup the datasource package
pgsql.php.
Therefore i would like to know if the following folder struture is
correct :
- Pear | |-MDB2.php |-.. |-\MDB2\
             |-\Driver
                       |-pgsql.php
                       |-  --> each subfolder has :
pgsql.php and
common.phpfiles
             |-...
You don't need to worry about the folder structure. You should be using the PEAR installer.
here is my code in my php file : $dsn = ' pgsql://my_login:my_pwd@my_dbname'; $mdb2 =& MDB2::connect($dsn); if (PEAR::isError($mdb2)) { die($mdb2->getMessage()); } $res =& $mdb2->query('SELECT * FROM articles'); if (PEAR::isError($res)) { die($res->getMessage() . '<br />' . $res->getDebugInfo()); }
What error message are you getting? -- Justin Patrin -- Alain ------------------------------------ Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5
-- Justin Patrin

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