Commit 331b29ee authored by Jean-Paul Saman's avatar Jean-Paul Saman

handle error case

parent a2b74ef1
...@@ -102,8 +102,9 @@ class CSetupTimesheet { ...@@ -102,8 +102,9 @@ class CSetupTimesheet {
$q = new DBQuery; $q = new DBQuery;
$q->createTable('timesheet'); $q->createTable('timesheet');
$q->createDefinition($sql); $q->createDefinition($sql);
$q->exec(); if (!$q->exec()) {
db_error(); db_error();
}
$sql = "( " . $sql = "( " .
" `timesheet_queue_id` int(11) NOT NULL auto_increment, " . " `timesheet_queue_id` int(11) NOT NULL auto_increment, " .
" `timesheet_id` int(11) unsigned NOT NULL, " . " `timesheet_id` int(11) unsigned NOT NULL, " .
...@@ -114,8 +115,9 @@ class CSetupTimesheet { ...@@ -114,8 +115,9 @@ class CSetupTimesheet {
$q->clear(); $q->clear();
$q->createTable('timesheet_project'); $q->createTable('timesheet_project');
$q->createDefinition($sql); $q->createDefinition($sql);
$q->exec(); if (!$q->exec()) {
db_error(); db_error();
}
return null; return null;
} }
} }
......
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