summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2009-10-20 15:34:18 +0000
committerChristian Schneider2009-10-20 15:34:18 +0000
commita535a8a4e601e750de6d679046efe2a73dfc17c0 (patch)
treec5661ade9eb975bba3e8a5cefa5de80531fad3be
parent368c2840b8734299250114edee85c8ce74a38091 (diff)
downloaditools-a535a8a4e601e750de6d679046efe2a73dfc17c0.tar.gz
itools-a535a8a4e601e750de6d679046efe2a73dfc17c0.tar.bz2
itools-a535a8a4e601e750de6d679046efe2a73dfc17c0.zip
Add own iteratorkey if no DB key was found
-rw-r--r--it_dbi.class3
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();
}