diff options
-rw-r--r-- | README | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -74,6 +74,14 @@ Example: $record = new T_Customers('ID' => 'mueller'); $record->update('email' => "mueller@spam.com"); $response = "Email added for $record->name"; + # Using Iterators (PHP 5+ only): + foreach (new T_Customers as $customer) { ... } # Iterate all customers + foreach (new T_Customers('age' => 42) as $customer) { ... } + foreach (new T_Customers as $id => $customer) { ... } # $id = $customer->_key + # ... you can iterate over any query (also multiple times): + $customers->select('age' => 42); + foreach ($customers as $customer) { foo($customer); } + foreach ($customers as $customer) { bar($customer); } Functions: it_dbi::createclasses($config) -- create database objects for each table name |