T1703271458

This commit is contained in:
Leander
2017-03-27 14:58:52 +02:00
parent 3b83abdd9d
commit 5341380cd0
2 changed files with 3 additions and 2 deletions

View File

@@ -29,7 +29,8 @@ class Database
} else {
$data = null;
}
//$this->create_response($data, $error);
$query_response=array('data' => $data, 'error' => $error);
return $query_response;
}
function create_response($data, $error) {

View File

@@ -11,7 +11,7 @@
$length = ($_GET['length'] && gettype(+$_GET['length']) == 'integer') ? +$_GET['length'] : 10;
$database = new Database();
$questions_count = $database->query('SELECT COUNT(*) FROM "Questions"');
$questions_count = $database->query('SELECT COUNT(*) FROM "Questions"')['data'];
echo pg_last_error();
echo $questions_count;