Return associative keys only.
authorJan Schneider <jan@horde.org>
Mon, 3 Jan 2011 21:12:03 +0000 (22:12 +0100)
committerJan Schneider <jan@horde.org>
Mon, 3 Jan 2011 21:16:19 +0000 (22:16 +0100)
framework/Db/lib/Horde/Db/Adapter/Mysqli.php
framework/Db/lib/Horde/Db/Adapter/Mysqli/Result.php

index c883fbf..a335ffe 100644 (file)
@@ -243,7 +243,7 @@ class Horde_Db_Adapter_Mysqli extends Horde_Db_Adapter_Base
     public function selectOne($sql, $arg1=null, $arg2=null)
     {
         $result = $this->execute($sql, $arg1, $arg2);
-        return $result ? $result->fetch_array() : array();
+        return $result ? $result->fetch_array(MYSQLI_ASSOC) : array();
     }
 
     /**
index e6b95d4..91c2229 100644 (file)
@@ -148,7 +148,7 @@ class Horde_Db_Adapter_Mysqli_Result implements Iterator
         }
 
         if ($this->_result) {
-            $row = $this->_result->fetch_array(MYSQLI_BOTH);
+            $row = $this->_result->fetch_array(MYSQLI_ASSOC);
             if (!$row) {
                 $this->_eof = true;
             } else {