Just something I have been using for a while. I converted it to use PDO objects last night, tested it and all seems alright. Currently it assumes the following,
1. Only supports the following datatypes int, text, varchar, datetime, tinyint and blob types. The last two are not really tested since I dont use them very often. Other types may work, but will generate a warning.
2. Requires an autoincrement primary key which is an int. Pretty standard stuff though.
3. You have a PDO php object to pass in (singleton pattern).
I am using it for a few things now though and it seems quite stable and good. Certainly makes it easier to write simple CRUD screens since you can just use an object to add/edit/delete.
I should also mention it has validator generation code in there as well... I would advise that you dont play with them till I get my auto validator code working 100%. The idea is that in the future you can generate your entity against the database, then plugin whatever you need to the frontend and it can generate the HTML form and validate it for you. Doing this would take out the two most annoying things for me when it comes to web development. The first being writing simple SQL for updates when im modifying the tables a lot (since this generates it for you) and the second being validating forms.
Anyways code is below. Feel free to use it however you want. I will probably clean it up at some point and stick it on google code.
Published on Monday 08th March 2010
boyter
LOL. That would be rather amusing though....
"Eternal life or your money back!" ![]()

Newer
laco
Heh, I read that as "PHP MySQL Entropy Generator" at first... was confused for a while there..