Re: Using PHP to generate SQL statement

From: Date: Thu, 23 Sep 2004 14:32:14 +0000
Subject: Re: Using PHP to generate SQL statement
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-36355@lists.php.net to get a copy of this message
Hello, On 09/23/2004 03:46 AM, Ed Lazor wrote:
I keep looking at the following code and thinking there's gotta be a better way. I've been in front of the computer all day tho and I'm drawing a blank. Any ideas?
You may want to consider a Data Access Objects (DAO) class generator. DAO classes encapsulate the storage and retrieval of data in database table rows as objects of associated classes. Each retrieved row is mapped to an object of a DAO class. The row columns are mapped to class variables. Since usually DAO classes are tedious to implement by hand, you may want to try this PHP DAO generator tool that lets you define your DAO classes in a simple XML format including variables, validation rules, relationships and functions that you need to manipulate your data objects and it generates all the code for you: http://freshmeat.net/projects/metastorage/ -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html

« previous php.db (#36355) next »