Hi,
As i'm new to PEAR world, i try to understand how does it work.
for that i took the MDB2 and try to use it with PostgreSQL.
here is a basic sample extract from PEAR help file and only modified.
require_once 'Pear/MDB2.php';
$dsn = 'pgsql://login:[EMAIL PROTECTED]';
$mdb2 =& MDB2::connect($dsn);
if (PEAR::isError($mdb2))
{
die($mdb2->getMessage());
}
$res =& $mdb2->query('SELECT * FROM articles');
while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))
{
echo $row['title'] . ', ' . $row['content'] . "\n";
}
$res->free();
when i try this code, the following error is raised :
Call to undefined method MDB2_Error::fetchRow() which points to ==> while
($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))
So i'm lost now ?
i have the feeling that something is missing but what ?
thanks a lot,
Al.