From db257c7de11da2771a9f61733f21a42c98cf2a97 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 1 Nov 2010 18:40:08 +0100 Subject: add CommonTable->optimize() method and call it during refresh --- class/TableIterator.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'class/TableIterator.php') diff --git a/class/TableIterator.php b/class/TableIterator.php index dfae859..6e44c18 100644 --- a/class/TableIterator.php +++ b/class/TableIterator.php @@ -230,7 +230,11 @@ class TableIterator implements Iterator if ($this->_res && $this->_pos<0) { if (!$this->_res->execute()) { $err = $this->_res->errorInfo(); - throw new Exception($err[2]); + throw new Exception( + "\nSQL: " . $this->_sql . + "\nERROR: " . $err[2] . + "\nCODE:" . $err[0] + ); } } return $this->next(); -- cgit