error-handling execute function

git-svn-id: file:///home/shish/svn/shimmie2/trunk@107 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-05-17 03:48:34 +00:00
parent 70cab73782
commit 8aa30d3ed2
1 changed files with 10 additions and 0 deletions

View File

@ -55,6 +55,16 @@ class Database {
return ceil($result->RecordCount() / $images_per_page);
}
}
public function execute($query, $args) {
$result = $this->db->Execute($query, $args);
if($result === False) {
print "SQL Error: " . $this->db->ErrorMsg() . "<br>";
print "Query: $query";
exit;
}
return $result;
}
// }}}
// extensions {{{
public function set_extension_version($name, $version) {