Update file index.php

This commit is contained in:
Jan BELLON 2024-03-12 09:51:48 +00:00
parent 35e39d836d
commit f1e43b1fbd

View File

@ -63,7 +63,6 @@ require "../include/functions.php";
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
$search = isset($_GET['search']) ? "%" . htmlspecialchars($_GET['search']) . "%" : "%%";
$req = $bdd->prepare("SELECT articles.ID, articles.titre, articles.date, articles.image, articles.resume, users.username, users.display_name FROM articles JOIN users ON articles.auteur = users.ID WHERE articles.classification <= :accreditation ORDER BY date DESC LIMIT 3");
$req->bindParam(":search", $search);
$req->bindParam(":accreditation", $_SESSION['accreditation']);
$req->execute();
$resultat = $req->fetchAll(PDO::FETCH_ASSOC);