Skip to content

Commit acaf0d1

Browse files
committed
Merge pull request #306 from oolso/master
bug fixed when using nestedJoin
2 parents df1b0b9 + b83e8a2 commit acaf0d1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

MysqliDb.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @copyright Copyright (c) 2010
1111
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
1212
* @link http://github.com/joshcam/PHP-MySQLi-Database-Class
13-
* @version 2.2
13+
* @version 2.4
1414
**/
1515
class MysqliDb
1616
{
@@ -960,8 +960,13 @@ protected function _dynamicBindResults(mysqli_stmt $stmt)
960960
}
961961
} else {
962962
$x = array();
963-
foreach ($row as $key => $val)
964-
$x[$key] = $val;
963+
foreach ($row as $key => $val) {
964+
if (is_array($val)) {
965+
foreach ($val as $k => $v)
966+
$x[$key][$k] = $v;
967+
} else
968+
$x[$key] = $val;
969+
}
965970
}
966971
$this->count++;
967972
array_push ($results, $x);

0 commit comments

Comments
 (0)