]> git.joonet.de Git - adminer.git/commitdiff
Offset probably required in fetch_field (bug #3100185)
authorJakub Vrana <jakub@vrana.cz>
Tue, 2 Nov 2010 13:40:56 +0000 (14:40 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 4 Nov 2010 08:51:23 +0000 (09:51 +0100)
adminer/drivers/mysql.inc.php

index 5720cabce10de544e090b0331d38840353e04bee..565e57abd25fdacfad79c201c775087b1d00ba06 100644 (file)
@@ -160,7 +160,7 @@ if (!defined("DRIVER")) {
                class Min_Result {
                        var
                                $num_rows, ///< @var int number of rows in the result
-                               $_result ///< @access private
+                               $_result, $_offset = 0 ///< @access private
                        ;
                        
                        /** Constructor
@@ -189,7 +189,7 @@ if (!defined("DRIVER")) {
                        * @return object properties: name, type, orgtable, orgname, charsetnr
                        */
                        function fetch_field() {
-                               $return = mysql_fetch_field($this->_result);
+                               $return = mysql_fetch_field($this->_result, $this->_offset++); // offset required under certain conditions
                                $return->orgtable = $return->table;
                                $return->orgname = $return->name;
                                $return->charsetnr = ($return->blob ? 63 : 0);