From 7319816b7c712cd16d6e83bcd617c95943b79be6 Mon Sep 17 00:00:00 2001
From: Aqua-sama
Date: Thu, 29 Apr 2021 20:43:35 +0300
Subject: CRUD reports
---
index.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'index.php')
diff --git a/index.php b/index.php
index f63f3af..02ad53a 100644
--- a/index.php
+++ b/index.php
@@ -39,11 +39,11 @@ foreach ($bugs_r as $row) {
Create
\n";
+ echo "Create
\n";
}
# reports query
-$reports_q = 'SELECT title, description, author FROM reports WHERE bug IS NULL';
+$reports_q = 'SELECT reports.id AS id, title, description, users.username AS user FROM reports JOIN users ON reports.author=users.id WHERE bug IS NULL ORDER BY id';
$reports_r = $conn->query($reports_q);
if($reports_r->rowCount() > 0) {
@@ -53,7 +53,7 @@ if($reports_r->rowCount() > 0) {
Title | Description | Submitted by |
$row[title] | " . truncate($row['description']) . " | $row[submitter] | \n";
+ echo "$row[title] | " . truncate($row['description']) . " | $row[user] |
\n";
}
?>
--
cgit v1.2.1