资 源 简 介
tableModel is a relatively small class (weighing in at only 317 lines and 9813 bytes without comments) that allows the developer to interact with MySQL tables as if they were...
stdClasses: $myTable->columnName = 12;
Arrays: $myTable[] = array("col1"=>"val1", "col2"=>"val2");
jQuery objects:
foreach ($myTable
->find("col1=%Q", $val1)
->filter("col2=%Q", $val2)
as $index=>$item) var_dump($index, $item);
And much more!
tableModel makes good use of the new magic methods and interfaces found in PHP5"s SPL. At present, it implements set, get, isset, ArrayAccess, Countable, and Iterator. Their use is generally intuitive, so you won"t likely be checking out the documentation too often.
Additionally, I made it a point to avoid using so much overloading that the basics aren"t both available and extended: there are ->_query (raw mysql_query), ->query (mysql query a