mirror of
https://github.com/dg/dibi.git
synced 2025-08-29 08:49:50 +02:00
* new: qualifiy each column name with the table name using DibiResult::setWithTables
* removed DibiResult::setType(TRUE) with autodetection * removed DibiResult::getFields() & getMetaData() in favour of new method getColumnsMeta() * MySQLi and MySQL transaction implementation are the same * better escaping in DibiPostgreDriver (new pg_escape_string and addslashes)
This commit is contained in:
@@ -55,26 +55,27 @@ echo '<hr>';
|
||||
|
||||
|
||||
// fetch row by row
|
||||
foreach ($res as $row => $fields) {
|
||||
print_r($fields);
|
||||
foreach ($res as $n => $row) {
|
||||
print_r($row);
|
||||
}
|
||||
echo '<hr>';
|
||||
|
||||
|
||||
// fetch row by row with defined offset
|
||||
foreach ($res->getIterator(2) as $row => $fields) {
|
||||
print_r($fields);
|
||||
foreach ($res->getIterator(2) as $n => $row) {
|
||||
print_r($row);
|
||||
}
|
||||
|
||||
// fetch row by row with defined offset and limit
|
||||
foreach ($res->getIterator(2, 1) as $row => $fields) {
|
||||
print_r($fields);
|
||||
foreach ($res->getIterator(2, 1) as $n => $row) {
|
||||
print_r($row);
|
||||
}
|
||||
|
||||
|
||||
// more complex association array
|
||||
$res = dibi::query('
|
||||
SELECT * FROM [products]
|
||||
SELECT *
|
||||
FROM [products]
|
||||
INNER JOIN [orders] USING ([product_id])
|
||||
INNER JOIN [customers] USING ([customer_id])
|
||||
');
|
||||
|
Reference in New Issue
Block a user