Re: Sql Query Builder
| From: | Lukas Smith | Date: | Sat, 14 May 2005 18:27:05 +0000 |
| Subject: | Re: Sql Query Builder | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19220@lists.php.net to get a copy of this message | ||
Ammar Ibrahim wrote:
I took a look at SQL query builder in LiveUser it's nice, but I'd like to see other options, any suggestions?this query builder is a decent starting point. however i intentionally didnt use objects to make the api easier for people to use. the idea was essentially people should only specify the data/filters etc they want and the query builder determines the necessary joins. this means however sometimes you need to hint what tables too look at in what order to make sure the the sql builder doesnt run into trouble. also i only handle simple where statements because i want to be able to write an xml backend with reasonable effort. you could extend the where statement generation through something similar to the criteria object in propel (you would have to have some way for the query builder look at the fields used inside and give some way to prefix the fields with a table name). so to conclude .. its by far not a general purpose query builder, but might be a decent starting point. aside from that there is querytool which does things a bit more OO-ish. regards, Lukas