=== A bit of history ===
Naf_Table was written by Victor Bolshov <crocodile2u@yandex.ru> in autumn 2006, as a part on Naf (Not A Framework) library. You are free to use it, change and redistribute.
If you want to know more about Naf, visit http://developer.berlios.de/projects/naf/
=== About ===
Naf_Table is a Data Table gateway - that is, a Object-Oriented wrapper for a database table. It provides easy means of create/read/update/delete, thus allowing to get rid of simple SQL queries written by hand.
=== Relatioship with Naf ===
Naf_Table is a part of Naf library. When used together with Naf, it could call Naf::dbConnect() - to retreive a default database connection.
IF YOU USE Naf_Table WITHOUT Naf - then you SHOULD call a static method Naf::setDefaultConnection() BEFORE you build the first instance of Naf_Table, otherwise you'll get an error.
=== About $where ===
Many methods of Naf_Table accept a $where argument. What is it? $where should come either in a form of a string (like "parent_id IS NULL") - or an array containing SQL expressions with placeholders as keys, and values you want to bind to those placeholders - as values. Example:
array("id = ?" => 5);// a record with id = 5 will be selected/updated/deleted.
More about placeholders read here: http://php.net/PDO
|