T1703271515

This commit is contained in:
Leander
2017-03-27 15:15:40 +02:00
parent e4c77e7b96
commit 0fe8cc9002
3 changed files with 18 additions and 6 deletions

View File

@@ -7,10 +7,17 @@
*/
require_once('includes.inc.php');
$data = '';
$error = 0;
$values = null;
$uid = $_GET['uid'];
$length = ($_GET['length'] && gettype(+$_GET['length']) == 'integer') ? +$_GET['length'] : 10;
$database = new Database();
$questions_count = $database->query('SELECT COUNT(*) FROM "Questions"')['data'][0]['count'];
echo($questions_count);
if($length > $questions_count) {
$error = 12101;
$values = array($questions_count);
}
Database::create_response($data, $error, $values);
?>