Refactored DB from global to singleton

This commit is contained in:
Latif Khalifa
2013-10-12 00:56:27 +02:00
parent e8aca8283b
commit afaf687507
9 changed files with 60 additions and 85 deletions

View File

@@ -13,9 +13,9 @@ $report = file_get_contents("php://input");
if (strlen($report))
{
$query = kl_str_sql('insert into raw_reports(raw_data) values (!s)', $report);
if ($res = $DB->query($query))
if ($res = DBH::$db->query($query))
{
$report_id = $DB->insertID();
$report_id = DBH::$db->insertID();
}
}