1
0
mirror of https://github.com/dg/dibi.git synced 2025-07-31 19:30:30 +02:00

+ DibiResult::fetchAll()

* changed year in headers (2007)
This commit is contained in:
David Grudl
2007-01-08 00:55:11 +00:00
parent 3b8766d376
commit ac980fe8c9
14 changed files with 143 additions and 49 deletions

View File

@@ -17,8 +17,7 @@ dibi::connect(array(
$res = dibi::query('SELECT * FROM table');
if (is_error($res))
die('SQL error');
if (!$res) die('SQL error');
// fetch a single value
@@ -28,9 +27,9 @@ $value = $res->fetchSingle();
$all = $res->fetchAll();
// fetch complete result set like association array
$assoc = $res->fetchAll('id');
$assoc = $res->fetchAssoc('id');
$assoc = $res->fetchAll('id', 'id2');
$assoc = $res->fetchAssoc('id', 'id2');
// fetch complete result set like pairs key => value
$pairs = $res->fetchPairs('id', 'name');