Database-driven applications should be easy to create. Let Model Buddy help you!
I wanted selecting a table row to be as simple as $Andrew = new Person(1); and updating that same item be as simple as $Andrew->update(); without having to abide by someone else’s template engine and program design standards so I created Model Buddy.
Model Buddy reads the structures of your MySQL database tables to learn how it should handle data, can be easily customized to perform validation checks and best of all allows you and or your team to stick to your current in-house design trends.
$Client = new Client() $Client->name = "Fred"; $Client->business = "Fred's Super Warehouse of Justice"; $Client->update();
Model Buddy will find your table’s primary key and can look up a record given only an index
$client = new Client(42);
Give Model Buddy an array of values to match when searching for a record
$client = new Client(array("client_id"=>42,"name"=>"Fred"));
Write your own where-clause for maximum flexibility! Don’t let operators stop you and certainly don’t use a different function. While you may have had to hand-write the where clause once, Model Buddy will handle it for you later when you need to insert, update or delete your record.
$client = new Client("client_id >?",array(100));
Yes, Model Buddy uses prepared statements with PDO MySQL so you don’t have to worry about manually escaping your data.
Best of all, Model Buddy helps the performance of you and or your development team by handling database operations with three simple commands: