summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README8
1 files changed, 8 insertions, 0 deletions
diff --git a/README b/README
index 936dd2f..8235c3c 100644
--- a/README
+++ b/README
@@ -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