Re: MDB2 simple test
| From: | Lorenzo Alberton | Date: | Sat, 11 Nov 2006 11:42:20 +0000 |
| Subject: | Re: MDB2 simple test | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25768@lists.php.net to get a copy of this message | ||
Alain Roger wrote:
require_once 'Pear/MDB2.php'; $dsn = 'pgsql://login:pwd@dbname'; $mdb2 =& MDB2::connect($dsn); if (PEAR::isError($mdb2)) {if (PEAR::isError($res)) {die($mdb2->getMessage());} $res =& $mdb2->query('SELECT * FROM articles');
die($res->getMessage());}
while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {HTH -- Lorenzo Alberton http://pear.php.net/user/quipo ___________________________________________________________________ Quipo Free Internet - 2 email, 150 Mb di spazio web e molto di più. ADSL, Hardware & Software Online Storeecho $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))