Erreur SQL

Résolu/Fermé
Utilisateur anonyme - 24 avril 2010 à 13:44
okuni Messages postés 1221 Date d'inscription jeudi 4 septembre 2008 Statut Membre Dernière intervention 2 janvier 2014 - 24 avril 2010 à 22:58
Bonjour, après l'envoie de monde formulaire j'ai cette erreur :

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

Voilà les 1ères lignes de mon code :

<?php 
if (isset($_POST['Envoyer']) && $_POST['Envoyer'] == 'Envoyer') { 

mysql_query('UPDATE groupe_a SET  match1_result1="'.mysql_escape_string($_POST['match1_result1']).'" , match1_result2="'.mysql_escape_string($_POST['match1_result2']).'" , match2_result1="'.mysql_escape_string($_POST['match2_result1']).'" , match2_result2="'.mysql_escape_string($_POST['match2_result2']).'" , match3_result1="'.mysql_escape_string($_POST['match3_result1']).'" , match3_result2="'.mysql_escape_string($_POST['match3_result2']).'" , match4_result1="'.mysql_escape_string($_POST['match4_result1']).'" , match4_result2="'.mysql_escape_string($_POST['match4_result2']).'" , match5_result1="'.mysql_escape_string($_POST['match5_result1']).'" , match5_result2="'.mysql_escape_string($_POST['match5_result2']).'" , match6_result1="'.mysql_escape_string($_POST['match6_result1']).'" , match6_result2="'.mysql_escape_string($_POST['match6_result2']).'") ')or die(mysql_error());
} else { $erreur = 'Attention !! Veuillez remplir tout les champs. Merci.'; }

3 réponses

okuni Messages postés 1221 Date d'inscription jeudi 4 septembre 2008 Statut Membre Dernière intervention 2 janvier 2014 126
24 avril 2010 à 15:05
Bonjour,
ici :
ult2']).'") ')or die(mysql_error());
tu a une parenthèse en trop (mise en gras)
0
Utilisateur anonyme
24 avril 2010 à 15:05
Merci je test !
0
Utilisateur anonyme
24 avril 2010 à 15:11
Nouvelle erreur :

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' match1_result2="8" , match2_result1="" , match2_result2="" , match3_result1="" ' at line 1
0
Utilisateur anonyme
24 avril 2010 à 15:16
Non c'est bon j'ai réussi !
0
okuni Messages postés 1221 Date d'inscription jeudi 4 septembre 2008 Statut Membre Dernière intervention 2 janvier 2014 126
24 avril 2010 à 22:58
Ok :)
0