MDB2
| From: | Dan Schultz | Date: | Thu, 10 May 2007 23:09:09 +0000 |
| Subject: | MDB2 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-27268@lists.php.net to get a copy of this message | ||
Hello,
I have been using the DB package up until now and now I want to install the
MDB2 package and start using that. I have it installed and I can use most of
the methods. I thought that MDB2 was just a combination of the DB package
and the metabase php db ab layers. So I think I should be able to use the
getAll method from the DB package, even though I am using MDB2 package.
require_once 'MDB2.php';
$mdb2 =& MDB2::connect('pgsql://usr:pw@localhost/dbnam');
if (PEAR::isError($mdb2)) {
die($mdb2->getMessage());
}
$mdb2->getAll($sql);
Doesn't work I get the error stating that getAll is an undefined function.
What am I missing in this case?
I can see that class MDB2 doesn't have this method, is there anyway to
access it, does MDB2 extend DB somehow? Or will ihave to change every
'getAll' call in my existing code if I want to use the MDB2 package?
Thanks for you help.
Dan Schultz
310.600.4938
dan@formula23.com
www.formula23.com