MDB2 and PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
            |-...

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());
}


thanks a lot,
Alain

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux