db sql builder wrapper for pear db.
| From: | Alan Knowles | Date: | Wed, 23 Jan 2002 09:17:06 +0000 |
| Subject: | db sql builder wrapper for pear db. | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-4108@lists.php.net to get a copy of this message | ||
On the subject of databases again :)
http://www.akbkhome.com/Projects/db_oo+-+an+object+based+Sql+builder+and+wrapper+for+peardb/current+source.html
Is an object based sql builder and access wrapper for pear db, I use it alot here to put the 'table' intelligence into the table wrapper, anyway, If anyone would like to throw some thought at it....
note: it is _NOT_ designed for speed, but rather clarity of code, and speeding up DB development.
heh, I actually enjoyed PEARifying it -- although I still need to StudlyCaps it :)
regards
alan
|
$instance = new mytable;
$instance->get("id",12);
echo $instance->somedata;
Get multiple rows, and update something
$instance = new mytable;
$instance->something=12;
$instance->find();
while ($instance->fetch()) {
echo $instance->somedata;
if ($instance->x=13) {
$instance->y=12
$instance->update();
}
}
|