>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.