Re: MDB2 error _doQuery

From: Date: Sat, 11 Nov 2006 19:26:40 +0000
Subject: Re: MDB2 error _doQuery
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25772@lists.php.net to get a copy of this message
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

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