diff options
-rw-r--r-- | it_dbi.class | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class index b783e58..0aedb07 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -783,7 +783,7 @@ function current() function key() { - return $this->_key; + return isset($this->_key) ? $this->_key : $this->_iteratorkey++; } function next() @@ -800,6 +800,7 @@ function rewind() if (!$this->_nofetch && mysql_num_rows($this->_result)) mysql_data_seek($this->_result, 0); + $this->_iteratorkey = 0; $this->iterate(); } |