diff --git a/php/reports.php b/php/reports.php index 9f23528..5b2851f 100644 --- a/php/reports.php +++ b/php/reports.php @@ -112,7 +112,7 @@ query('SELECT tr.*, tq.question as original FROM triviareport tr INNER JOIN triviaquestion tq on tq.id=question_num LIMIT 10'); + $q = $db->query('SELECT tr.*, tq.question as original FROM triviareport tr INNER JOIN triviaquestion tq on tq.id=question_num ORDER BY id DESC LIMIT 10'); if ($q === false) { die("Error: database error: table does not exist\n"); } else { @@ -227,6 +227,53 @@ + + +
+
+ +
+
+
+
+

Added Questions

+ + + + + + + + + + query('SELECT tq.* FROM triviatemporaryquestion tq ORDER BY tq.id DESC LIMIT 10'); + if ($q === false) { + die("Error: database error: table does not exist\n"); + } else { + $result = $q->fetchAll(); + foreach($result as $res) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + } + } else { + die('Couldnt connect to db'); + } + ?> + +
#AuthorNew Question
' . $res['id'] . '' . $res['username'] . '' . $res['question'] . '
+
+
+