From b30acc2ab67393a128a39da8eb90f97382b05258 Mon Sep 17 00:00:00 2001 From: Jan BELLON Date: Fri, 8 Mar 2024 19:12:18 +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 b43b8e50..51319f0b 100644 --- a/html/news.php +++ b/html/news.php @@ -48,7 +48,7 @@ if (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) AND classification <= :accreditation ORDER BY date DESC"); + $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->bindParam(":search", $search); $req->bindParam(":accreditation", $_SESSION['accreditation']); $req->execute();