From f8318961edc9a9ca769cb7a69c1da734e294a0c6 Mon Sep 17 00:00:00 2001 From: ruan Date: Sun, 26 Jan 2020 12:51:52 +0200 Subject: [PATCH] Check names based on descending order of login date instead of ascending --- check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.php b/check.php index d755723..3c5c500 100644 --- a/check.php +++ b/check.php @@ -18,7 +18,7 @@ class Check { $table = $page->settings->table['history']; // Not user input try { - $stmt = $page->conn->prepare("SELECT name,uuid FROM $table WHERE $column=:val ORDER BY date LIMIT 1"); + $stmt = $page->conn->prepare("SELECT name,uuid FROM $table WHERE $column=:val ORDER BY date DESC LIMIT 1"); $stmt->bindParam(':val', $name, PDO::PARAM_STR); if ($stmt->execute()) { if ($row = $stmt->fetch()) {