Update file news.php
This commit is contained in:
parent
24c157d4c0
commit
b30acc2ab6
@ -48,7 +48,7 @@ if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
|
|||||||
if ($article == "") {
|
if ($article == "") {
|
||||||
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
|
||||||
$search = isset($_GET['search']) ? "'%" . htmlspecialchars($_GET['search']) . "%'" : "'%%'";
|
$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(":search", $search);
|
||||||
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
$req->bindParam(":accreditation", $_SESSION['accreditation']);
|
||||||
$req->execute();
|
$req->execute();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user