T201704031042

This commit is contained in:
Leander
2017-04-03 10:42:52 +02:00
parent 58bf850edf
commit 6c2e4555e2

View File

@@ -14,7 +14,7 @@
$length = isset($_GET['length']) ? $_GET['length'] : ''; $length = isset($_GET['length']) ? $_GET['length'] : '';
$length = (($length === '0') || ($length && gettype(+$length) == 'integer')) ? +$_GET['length'] : 10; $length = (($length === '0') || ($length && gettype(+$length) == 'integer')) ? +$_GET['length'] : 10;
$db = new Database(); $db = new Database();
$questions_count = $db->query('SELECT COUNT(*) FROM "Questions"');//['data'][0]['count']; $questions_count = $db->query('SELECT COUNT(*) FROM "Questions"')['data'][0]['count'];
// Return $count random, non repeating numbers in range from $min to $max. // Return $count random, non repeating numbers in range from $min to $max.
function random_numbers($min, $max, $count){ function random_numbers($min, $max, $count){