YES, i have just done it!
Thank you!!
Oliver Christen ha scritto:
err, MDB is not DB, thats the functions list:
http://pear.php.net/manual/en/package.database.db.php
so it's either
$data =& $db->getAll('SELECT cf, nf, df FROM foo',
array(), DB_FETCHMODE_ORDERED);
or
$res =& $db->query('SELECT * FROM mytable');
while ($row =& $res->fetchRow()) {
// Assuming DB's default fetchmode is
// DB_FETCHMODE_ORDERED
$data[] = $row;
}
something like that
Hi. Consider this:
$dsn = $this->getConfig()->dbSecurityDsn;
$db = Utils::getDb($db, $dsn);
$sql = "select myval from db";
$res = $db->query($sql);
Utils::checkDbError($res);
$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:
http://pear.php.net/reference/MDB-0.9.2/apidoc/MDB-0.9.2/MDB_common.html#methodfetchAll
..and how can i do to close DB connection with PEAR?
Thanks
--
Ing. Fabio D'Ovidio
INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: [EMAIL PROTECTED]
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users