资 源 简 介
Provides an object-oriented way to retrieve data from a mysql database and provides active record functionality.
Database inputs are automatically escaped and all field and table names are auto-backticked (both are optional).
See example.php for example usage and example.Class.php for an example of extending AutoDB into a customised model.
I.e.
$table = new AutoDB("my_table");$name = "%bob%";$results = $table->Select("ID, Name")->Like("Name",$name)->Get();//Produces: Select `ID`, `Name` From `my_table` Where `Name` Like "%bob%"if ($results == False){ echo "None Found";}else{ foreach($results as $record) { echo "ID: $record->ID, Name: $record->Name"; $record->Name = "bob"; } $results->Save(); //Save