Re: Suggestions for class design
| From: | M Saleh EG | Date: | Mon, 19 Sep 2005 21:33:36 +0000 |
| Subject: | Re: Suggestions for class design | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-222696@lists.php.net to get a copy of this message | ||
From what I understand is you need a data objects class. Use a generic class
such as PEAR's DB_DataObject (http://pear.php.net/package/DB_DataObject).
All you have to do is give the table name and the class for example would be
in our case
DB_DataObject_Customer
And then querying the table would be in a line such as
[code]
$customer_data=new DB_DataObject_Customer();
$customer->get, ->insert,->find, ->update and the other goodies given that
you supply the right parameters.
[/code]
HTH.