From 19fccd3abe32596e415420e1fe11bc0b1c1b54a2 Mon Sep 17 00:00:00 2001 From: Jan Felix Wiebe Date: Fri, 28 Dec 2018 01:26:41 +0100 Subject: [PATCH] changed view order --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 58e3290..4268e8c 100644 --- a/index.php +++ b/index.php @@ -23,7 +23,7 @@ function auth(){ function get_founditems($onlyUnmatched = false){ global $mysqli; if ($onlyUnmatched) { - $res = $mysqli->query("SELECT items.* FROM items LEFT JOIN matches ON items.id = matches.l_id WHERE matches.l_id IS NOT NULL ORDER BY items.id ASC"); + $res = $mysqli->query("SELECT items.* FROM items LEFT JOIN matches ON items.id = matches.l_id WHERE matches.l_id IS NOT NULL ORDER BY items.id DESC"); } else { $res = $mysqli->query("SELECT * FROM items ORDER BY id ASC"); } @@ -37,7 +37,7 @@ function get_founditems($onlyUnmatched = false){ function get_lostitems($onlyUnmatched = false){ global $mysqli; if ($onlyUnmatched) { - $res = $mysqli->query("SELECT lost.* FROM lost LEFT JOIN matches ON lost.id = matches.f_id WHERE matches.f_id IS NOT NULL ORDER BY lost.id ASC"); + $res = $mysqli->query("SELECT lost.* FROM lost LEFT JOIN matches ON lost.id = matches.f_id WHERE matches.f_id IS NOT NULL ORDER BY lost.id DESC"); } else { $res = $mysqli->query("SELECT * FROM lost ORDER BY id ASC"); }