Erreur SQL
Résolu
Utilisateur anonyme
-
okuni Messages postés 1325 Statut Membre -
okuni Messages postés 1325 Statut Membre -
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 :
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
-
Bonjour,
ici :ult2']).'") ')or die(mysql_error());
tu a une parenthèse en trop (mise en gras) -
-
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