diff --git a/MysqliDb.php b/MysqliDb.php index f9186a62..aa099b00 100644 --- a/MysqliDb.php +++ b/MysqliDb.php @@ -1469,6 +1469,7 @@ protected function _buildLimit($numRows) protected function _prepareQuery() { if (!$stmt = $this->mysqli()->prepare($this->_query)) { + $this->reset(); throw new Exception("Problem preparing query ($this->_query) " . $this->mysqli()->error); }