From dc9181fc243ddf02a01af0d5fcda1dde2ca48699 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 21 Oct 2007 17:13:57 +0000 Subject: [PATCH] re-inline error_check, since it only works inline... git-svn-id: file:///home/shish/svn/shimmie2/trunk@535 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index fe7e54a6..61752304 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -74,7 +74,14 @@ class Database { } public function execute($query, $args=array()) { - return $this->error_check($this->db->Execute($query, $args)); + $result = $this->db->Execute($query, $args); + if($result === False) { + print "SQL Error: " . $this->db->ErrorMsg(); + print "
Query: $query"; + print "
Args: "; print_r($args); + exit; + } + return $result; } public function cache_execute($time, $query, $args=array()) { @@ -83,7 +90,7 @@ class Database { return $this->error_check($this->db->CacheExecute($time, $query, $args)); } else { - return $this->error_check($this->db->Execute($query, $args)); + return $this->execute($query, $args); } }