diff --git a/webroot/index.php b/webroot/index.php index 1ee0dbf..c1467d7 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -9,14 +9,10 @@ $censor = new CensorWords(); $conn = connectToDatabase(); -$stmt = $conn->prepare("SELECT * FROM colors"); +$stmt = $conn->prepare("SELECT * FROM colors ORDER BY timestamp DESC"); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); -usort($result, function($a, $b) { - return strcmp($b['timestamp'], $a['timestamp']); -}); - $lastInsertId = $_GET['highlight'] ?? null; ?>