[Cartoweb-users] fetchAll in querying DB

Fabio D'Ovidio fabiodovidio at gmail.com
Thu Mar 27 11:27:16 EDT 2008

Hi. Consider this:
         $dsn = $this->getConfig()->dbSecurityDsn;
         $db = Utils::getDb($db, $dsn);
         $sql = "select myval from db";
         $res = $db->query($sql);
         $row =& $res->fetchRow(DB_FETCHMODE_OBJECT);
         $value = $row->myval ;

Now, if query result is >1 how can I do to fetch all results?

I try with "fetchAll", but the error is:
*Fatal error*: Call to undefined method DB_result::fetchAll(), but I see:

..and how can i do to close DB connection with PEAR?


Ing. Fabio D'Ovidio

INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio at gmail.com

More information about the Cartoweb-users mailing list