Update file editpage.php

This commit is contained in:
Jan BELLON 2024-03-11 15:27:59 +00:00
parent f32c49b2b0
commit afa0648b2d

View File

@ -170,7 +170,7 @@ if(isset($fichier)) {
$condition = "";
if(isset($_GET['search'])) {
$search = "%" . htmlspecialchars($_GET['search']) . "%";
$condition = "AND (titre LIKE " . $search . " OR ID LIKE " . $search . ") ";
$condition = "AND (titre LIKE '" . $search . "' OR ID LIKE '" . $search . "') ";
}
$req = $bdd->prepare("SELECT ID, titre, date FROM articles WHERE classification <= :accreditation " . $condition . "ORDER BY date DESC LIMIT 10");
$req->bindParam(":accreditation", $_SESSION['accreditation']);