Check names based on descending order of login date instead of ascending

This commit is contained in:
ruan 2020-01-26 12:51:52 +02:00
parent 6c40fdfeb9
commit f8318961ed

View File

@ -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()) {