cvs: pear /MDB/MDB Common.php
| From: | Lukas Smith | Date: | Sun, 01 Jun 2003 13:56:53 +0000 |
| Subject: | cvs: pear /MDB/MDB Common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10642@lists.php.net to get a copy of this message | ||
lsmith Sun Jun 1 09:56:53 2003 EDT
Modified files:
/pear/MDB/MDB Common.php
Log:
fixed bugs in fetchAll
Index: pear/MDB/MDB/Common.php
diff -u pear/MDB/MDB/Common.php:1.108 pear/MDB/MDB/Common.php:1.109
--- pear/MDB/MDB/Common.php:1.108 Wed May 28 06:36:18 2003
+++ pear/MDB/MDB/Common.php Sun Jun 1 09:56:52 2003
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.108 2003/05/28 10:36:18 lsmith Exp $
+// $Id: Common.php,v 1.109 2003/06/01 13:56:52 lsmith Exp $
/**
* @package MDB
@@ -3729,8 +3729,7 @@
while (is_array($row = $this->fetchInto($result, $fetchmode, $rownum))) {
if ($rekey) {
if ($fetchmode & MDB_FETCHMODE_ASSOC) {
- reset($result);
- $key = current($row);
+ $key = reset($row);
unset($result[key($row)]);
} else {
$key = array_shift($row);
@@ -3745,7 +3744,7 @@
}
} else {
if ($fetchmode & MDB_FETCHMODE_FLIPPED) {
- foreach ($result as $key => $val) {
+ foreach ($row as $key => $val) {
$all[$key][] = $val;
}
} else {