From 333161073eeac39bab5729bc93e13c8044159cb6 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Tue, 20 Sep 2016 19:58:03 +0100 Subject: [PATCH] Fix SQL error with tags --- chant_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chant_edit.php b/chant_edit.php index 2e97e8b..b137aef 100644 --- a/chant_edit.php +++ b/chant_edit.php @@ -101,7 +101,7 @@ if(!$logged_in) { } foreach($mypost['tags'] as $t) { if($t > '') { - $sql1 = 'SELECT * FROM '.db('tags').' WHERE tag LIKE '.$mysqli->real_escape_string($t); + $sql1 = 'SELECT * FROM '.db('tags').' WHERE tag LIKE "'.$mysqli->real_escape_string($t).'"'; $req1 = $mysqli->query($sql1) or die('Erreur SQL !
'.$sql1.'
'.$mysqli->error); $tt = $req1->fetch_assoc(); if($tt) {