DB_QueryTool without extends
| From: | Jackson Miller | Date: | Mon, 15 Sep 2003 15:37:21 +0000 |
| Subject: | DB_QueryTool without extends | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7814@lists.php.net to get a copy of this message | ||
Is it possible to useDB_QueryTool without extending the class?
Ideally I would like to be able to pass an existing DB connection reference,
but at the least just pass the DSN.
I would like to do the following
$query = new DB_QueryTool("[dsn || DB reference]");
$query->reset();
$query->setTable("main_table");
$query->addSelect("id");
$query->addSelect("name");
$query->addSelect("group");
$query->addJoin('groups','member.group=groups.group_id');
$query->addWhere('member.group > 5');
$query->setOrder('name');
$results = $query->getAll();
I am in the process of trying to test this now, but I am not sure how to pass
the DB connection stuff.
Thanks,
-Jackson
--
jackson miller
cold feet creative
615.321.3300 / 800.595.4401
jackson@coldfeetcreative.com
cold feet presents Emma
the world's easiest email marketing
Learn more @ http://www.myemma.com