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

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:



Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP

PHP Reviews - Reviews of PHP books and other products

Metastorage - Data object relational mapping layer generator

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to