From 56820b4c5ba8d6dbf22f525550c572d04385a25d Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Mon, 11 Mar 2024 15:40:22 +0000 Subject: [PATCH] Update file news.php --- html/news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/news.php b/html/news.php index 84017122..770fbd6f 100644 --- a/html/news.php +++ b/html/news.php @@ -60,7 +60,7 @@ if (isset($_GET['article']) && filter_var($_GET['article'], FILTER_VALIDATE_INT) if ($article == "") { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $search = isset($_GET['search']) ? "%" . htmlspecialchars($_GET['search']) . "%" : "%%"; - $req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE (titre LIKE :search OR ID LIKE :search OR auteur LIKE :search) AND classification <= :accreditation ORDER BY date DESC"); + $req = $bdd->prepare("SELECT ID, titre, date, auteur FROM articles WHERE (titre LIKE :search OR ID LIKE :search OR auteur LIKE :search) AND classification <= :accreditation ORDER BY date DESC"); $req->bindParam(":search", $search); $req->bindParam(":accreditation", $_SESSION['accreditation']); $req->execute();