Re: Sql Query Builder
| From: | Justin Patrin | Date: | Sun, 15 May 2005 16:21:38 +0000 |
| Subject: | Re: Sql Query Builder | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19227@lists.php.net to get a copy of this message | ||
On 5/14/05, Ammar Ibrahim <ammar@gnuix.com> wrote:
> I'm writing a search engine for a sophisticated Laws & legislations
> database. The problem is that the interface is somehow complex, now I
> managed to write a class to map form fields to database tables & fields
> with search operators. I'm looking for a SQL query builder that would
> make writing SQL statements more modular, as I want changes to be made
> easily and in a better way.
>
> I took a look at SQL query builder in LiveUser it's nice, but I'd like
> to see other options, any suggestions?
>
There are a few things already in PEAR for this purpose. There's
DB_QueryTool, which does SQL building and there's DB_DataObject which
tries to abstract away pretty much all SQL handling and also acts as a
data encapsulator. If you use DB_DataObject then you can also use
DB_DataObject_FormBuilder, which is a very useful package for creating
HTML_QuickForms for editing DB data.
There's also other projects such as Propel which do this kind of thing.
--
Justin Patrin