Erreur SQL

Résolu
Utilisateur anonyme -  
okuni Messages postés 1221 Date d'inscription   Statut Membre Dernière intervention   -
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   Statut Membre Dernière intervention   126
 
Bonjour,
ici :
ult2']).'") ')or die(mysql_error());
tu a une parenthèse en trop (mise en gras)
0
Utilisateur anonyme
 
Merci je test !
0
Utilisateur anonyme
 
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
 
Non c'est bon j'ai réussi !
0
okuni Messages postés 1221 Date d'inscription   Statut Membre Dernière intervention   126
 
Ok :)
0