Probleme mysql error in your SQL syntax;
Bonjour,
j'ai un problème mysql, quand j'envoie la requête à ma base, il m'affiche ce message d'erreur:
Citation:
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 ''iga1'.'profil' ('ID_PROFIL', 'NOM_PROF', 'PROF_SALOME', 'PROF_MANTIS') VALU' at line 1
voici mon code php:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <?php
include('conf.php');
//récupération des valeurs des champs:
$nom = $_POST["nom"] ;
$s = $_POST["salome"];
$m = $_POST["mantis"];
//création de la requête SQL:
$sql = "INSERT INTO 'iga1'.'profil' ('ID_PROFIL', 'NOM_PROF', 'PROF_SALOME', 'PROF_MANTIS')
VALUES ( NULL,'$nom','$s','$m')" ;
$requete = mysql_query($sql) or die( mysql_error() ) ;
if($requete)
{echo "<script language='JavaScript'>alert('Profil ajouté avec succés')</script>";
}
else
{
echo"<script language='JavaScript'>alert('L ajout a échoué')</script>";
}
?> |
:(:(:(:(:(:(8-)8-)8-)