Commit b5068c0a authored by Alexander Butenko's avatar Alexander Butenko
parents cf8ef87e 8eea785a
...@@ -1190,7 +1190,7 @@ class MysqliDb ...@@ -1190,7 +1190,7 @@ class MysqliDb
protected function _prepareQuery() protected function _prepareQuery()
{ {
if (!$stmt = $this->mysqli()->prepare($this->_query)) { if (!$stmt = $this->mysqli()->prepare($this->_query)) {
trigger_error("Problem preparing query ($this->_query) " . $this->mysqli()->error, E_USER_ERROR); throw new Exception("Problem preparing query ($this->_query) " . $this->mysqli()->error);
} }
if ($this->traceEnabled) if ($this->traceEnabled)
$this->traceStartQ = microtime (true); $this->traceStartQ = microtime (true);
...@@ -1315,7 +1315,7 @@ class MysqliDb ...@@ -1315,7 +1315,7 @@ class MysqliDb
if (!empty ($matches[2])) $items = $matches[2]; if (!empty ($matches[2])) $items = $matches[2];
if (!empty ($matches[3])) $type = $matches[3]; if (!empty ($matches[3])) $type = $matches[3];
if (!in_array($type, array_keys($types))) if (!in_array($type, array_keys($types)))
trigger_error ("invalid interval type in '{$diff}'"); throw new Exception("invalid interval type in '{$diff}'");
$func .= " ".$incr ." interval ". $items ." ".$types[$type] . " "; $func .= " ".$incr ." interval ". $items ." ".$types[$type] . " ";
} }
return $func; return $func;
...@@ -1342,7 +1342,7 @@ class MysqliDb ...@@ -1342,7 +1342,7 @@ class MysqliDb
*/ */
public function inc($num = 1) { public function inc($num = 1) {
if(!is_numeric($num)){ if(!is_numeric($num)){
trigger_error('Argument supplied to inc must be a number', E_USER_ERROR); throw new Exception('Argument supplied to inc must be a number');
} }
return Array ("[I]" => "+" . $num); return Array ("[I]" => "+" . $num);
} }
...@@ -1353,7 +1353,7 @@ class MysqliDb ...@@ -1353,7 +1353,7 @@ class MysqliDb
*/ */
public function dec ($num = 1) { public function dec ($num = 1) {
if(!is_numeric($num)){ if(!is_numeric($num)){
trigger_error('Argument supplied to dec must be a number', E_USER_ERROR); throw new Exception('Argument supplied to dec must be a number');
} }
return Array ("[I]" => "-" . $num); return Array ("[I]" => "-" . $num);
} }
...@@ -1488,4 +1488,3 @@ class MysqliDb ...@@ -1488,4 +1488,3 @@ class MysqliDb
return $this->count == $count; return $this->count == $count;
} }
} // END class } // END class
?>
...@@ -689,4 +689,3 @@ class dbObject { ...@@ -689,4 +689,3 @@ class dbObject {
spl_autoload_register ("dbObject::dbObjectAutoload"); spl_autoload_register ("dbObject::dbObjectAutoload");
} }
} }
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment