Bonjour à tous,

j'ai l'erreur suivante :

[06-Mar-2016 13:36:19 UTC] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10, 10' at line 6' in /home/flatforswap/public/liste.php:1627
Stack trace:
#0 /home/flatforswap/public/liste.php(1627): PDOStatement->execute(Array)
#1 {main}
thrown in /home/flatforswap/public/liste.php on line 1627
[06-Mar-2016 13:36:37 UTC] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10, 10' at line 6' in /home/flatforswap/public/liste.php:1627
Stack trace:
#0 /home/flatforswap/public/liste.php(1627): PDOStatement->execute(Array)
#1 {main}
thrown in /home/flatforswap/public/liste.php on line 1627

cela correspond à cette ligne de code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
$sqla->execute(array($continent, $ad_pays, $valeur_valide));
la requête entière est

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
// on sélectionne tous les champs nécessaire à l'affichage
 
			$sqla = $db->prepare("SELECT A.id_adh, A.id_vil, B.id_vil, B.id_pay, B.ville_fr, C.id_pay, C.id_con, C.pays_".$lang.", D.cont_".$lang."
			FROM flatforswap_adherent A
			INNER JOIN flatforswap_ville B ON A.id_vil = B.id_vil
			INNER JOIN flatforswap_pays C ON B.id_pay = C.id_pay 
			INNER JOIN flatforswap_continent D ON D.id_con = C.id_con
			WHERE D.cont_".$lang."=? and C.pays_".$lang."=? AND A.valide =? ORDER BY A.id_adh ASC limit $start, $epp");
			$sqla->execute(array($continent, $ad_pays, $valeur_valide));
			}
Merci d'avance pour votre aide.