Bonjour,
jai un probleme mysql quand jenvoi lé requete a ma base il m'affiche ce message d'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 ''iga1'.'profil' ('ID_PROFIL', 'NOM_PROF', 'PROF_SALOME', 'PROF_MANTIS') VALU' at line 1
voici mon code php:
<?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>";
}
?>
*******ma table dans ma base******
mysql> describe profil;
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| ID_PROFIL | int(11) | NO | PRI | NULL | auto_increment |
| NOM_PROF | char(20) | YES | | NULL | |
| PROF_SALOME | smallint(11) | NO | | NULL | |
| PROF_MANTIS | smallint(11) | NO | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
4 rows in set (0,00 sec)