summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 08cbf3c..9c6e691 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -472,6 +472,7 @@ function select($query = null)
$nofetch = $this->_nofetch = $query['NOFETCH'];
unset($query['NOFETCH']);
+ $this->clear(false);
if ($this->_result = $this->query($sql = "SELECT $what FROM $join " . $this->_where($query, $this->_link)))
$result = mysql_num_rows($this->_result);
@@ -499,7 +500,6 @@ function iterate()
{
if (!$this->_nofetch)
{
- $this->clear(false);
if ($this->_data = mysql_fetch_assoc($this->_result))
{
if (!empty($this->_p['keyfield']))
@@ -508,6 +508,8 @@ function iterate()
foreach ($this->_data as $key => $value)
$this->$key = $value;
}
+ else
+ $this->clear(false);
$this->_read_post_process();
}