diff --git a/Zebra_Database.php b/Zebra_Database.php index a1944b8..212ebdf 100755 --- a/Zebra_Database.php +++ b/Zebra_Database.php @@ -3139,6 +3139,7 @@ public function query($sql, $replacements = '', $cache = false, $calc_rows = fal if (!$this->_connected()) return false; unset($this->affected_rows); + unset($this->last_result); // if $replacements is specified but it's not an array if ($replacements !== '' && !is_array($replacements)) @@ -3231,8 +3232,6 @@ public function query($sql, $replacements = '', $cache = false, $calc_rows = fal // add the 'SQL_CALC_FOUND_ROWS' parameter to the query $sql = preg_replace('/^(.*?)SELECT/is', '$1SELECT SQL_CALC_FOUND_ROWS', $sql, 1); - if (isset($this->last_result)) unset($this->last_result); - // starts a timer list($usec, $sec) = explode(' ', microtime());