T1703271458
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user