mirror of
https://github.com/dg/dibi.git
synced 2025-08-07 06:36:44 +02:00
* renamed some files libs
* added doc comments to drivers * DibiDriver::prepare() renamed to config() * fixed connection error handling in Postgre driver
This commit is contained in:
@@ -58,6 +58,11 @@ foreach ($res as $row => $fields) {
|
||||
echo '<hr>';
|
||||
|
||||
|
||||
// fetch row by row with defined offset
|
||||
foreach ($res->getIterator(2) as $row => $fields) {
|
||||
print_r($fields);
|
||||
}
|
||||
|
||||
// fetch row by row with defined offset and limit
|
||||
foreach ($res->getIterator(2, 1) as $row => $fields) {
|
||||
print_r($fields);
|
||||
@@ -74,3 +79,11 @@ INNER JOIN [customers] USING ([customer_id])
|
||||
$assoc = $res->fetchAssoc('customers.name,products.title'); // key
|
||||
print_r($assoc);
|
||||
echo '<hr>';
|
||||
|
||||
$assoc = $res->fetchAssoc('customers.name,*,products.title'); // key
|
||||
print_r($assoc);
|
||||
echo '<hr>';
|
||||
|
||||
$assoc = $res->fetchAssoc('customers.name,#,products.title'); // key
|
||||
print_r($assoc);
|
||||
echo '<hr>';
|
||||
|
Reference in New Issue
Block a user