T1703271458
This commit is contained in:
@@ -29,7 +29,8 @@ class Database
|
|||||||
} else {
|
} else {
|
||||||
$data = null;
|
$data = null;
|
||||||
}
|
}
|
||||||
//$this->create_response($data, $error);
|
$query_response=array('data' => $data, 'error' => $error);
|
||||||
|
return $query_response;
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_response($data, $error) {
|
function create_response($data, $error) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
$length = ($_GET['length'] && gettype(+$_GET['length']) == 'integer') ? +$_GET['length'] : 10;
|
$length = ($_GET['length'] && gettype(+$_GET['length']) == 'integer') ? +$_GET['length'] : 10;
|
||||||
$database = new Database();
|
$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 pg_last_error();
|
||||||
echo $questions_count;
|
echo $questions_count;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user