Erreur SQL

Répondre
zOy
le 18/04/2008 à 15:59
zOy
Bonjour à tous, j'ai une erreur SQL et je ne vois pas du tout d'où cela peut provenir.

<?
include 'config.php';
// lancement de la requete
$sql = 'INSERT INTO reservation_work1 SET
civilite="'.$_POST['civilite'].'",
nom="'.$_POST['nom'].'",
prenom="'.$_POST['prenom'].'",
naissance="'.$_POST['naissance'].'",
mail="'.$_POST['mail'].'",
adresse="'.$_POST['adresse'].'",
code_postal="'.$_POST['code_postal'].'",
ville="'.$_POST['ville'].'",
pays="'.$_POST['pays'].'",
gsm="'.$_POST['gsm'].'",
tel="'.$_POST['tel'].'",
fax="'.$_POST['fax'].'",
nom_reservation="'.$_POST['nom_reservation'].'",
hotel="'.$_POST['hotel'].'",
nbr_personne="'.$_POST['nbr_personne'].'",
single="'.$_POST['single'].'",
double="'.$_POST['double'].'",
triple="'.$_POST['triple'].'",
debut_sejour="'.$_POST['debut_sejour'].'",
fin_sejour="'.$_POST['fin_sejour'].'",
green_fee="'.$_POST['green_fee'].'",
lesson="'.$_POST['lesson'].'",
buggy_18="'.$_POST['buggy_18'].'",
buggy_9"'.$_POST['buggy_9'].'",
full="'.$_POST['full'].'",
demi_set="'.$_POST['demi_set'].'",
trolley_18="'.$_POST['trolley_18'].'",
driving_range_15="'.$_POST['driving_range_15'].'",
practice_fee="'.$_POST['practice_fee'].'",
caddy="'.$_POST['caddy'].'",
cure_classique2j="'.$_POST['cure_classique2j'].'",
cure_classique4j="'.$_POST['cure_classique4j'].'",
cure_specifique5j="'.$_POST['cure_specifique5j'].'",
soins_hydro="'.$_POST['soins_hydro'].'",
soins_massages="'.$_POST['soins_massages'].'",
soins_relaxation_coreene="'.$_POST['soins_relaxation_coreene'].'",
res_chirurgie="'.$_POST['res_chirurgie'].'"';

// on insere le tuple (mysql_query) et au cas où, on écrira un petit message d'erreur si la requête ne se passe pas bien (or die)
mysql_query ($sql) or die ('Erreur SQL !'.$sql.'<br />'.mysql_error());

// on ferme la connexion à la base
mysql_close();
header('Location: ok_reservation.php');
?>


Voiçi le message d'erreur :
Erreur SQL !INSERT INTO reservation_work1 SET civilite="Madame", nom="BLABLOU", prenom="Fatima", naissance="12/11/1990", mail="contact@accueilsoins-tunisie.com", adresse="fdsf", code_postal="92000", ville="La Rochelle", pays="France", gsm="0614068605", tel="0147246268", fax="0546859634", nom_reservation="DUARTE Mike", hotel="Hotel Hamamet", nbr_personne="5", single="5", double="", triple="", debut_sejour="18-04-2008", fin_sejour="03-05-2008", green_fee="Sans Green Fee", lesson="Pas de le�on", buggy_18="", buggy_9"", full="", demi_set="", trolley_18="", driving_range_15="", practice_fee="Oui", caddy="", cure_classique2j="", cure_classique4j="", cure_specifique5j="", soins_hydro="Forfait FORME (35�)", soins_massages="Massage complet (50m - 28�)", soins_relaxation_coreene="Relaxation cor�ene (60m - 45�)", res_chirurgie="Oui"
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 'double="", triple="", debut_sejour="18-04-2008", fin_sejour="03-05-2008", ' at line 18
Blue Star Investment
Keika
le 18/04/2008 à 16:19
Keika
hmm qu'est-ce que tu es sence recevoir dans debut/fin_sejour ? une date ou juste un int ? Sinon verifie ce que tu as mis pour double et triple et voit aussi si tu peux ne rien mettre dedans. Je pense que tu as une erreur entre ce que SQL s'attends a recevoir et ce que tu lui envois.
Le PHP --> C'est dur !
zOy
le 18/04/2008 à 17:01
zOy
Tout est OK, je ne vois vraiment pas d'où vien l'erreur !

voici la page des formulaires :
<form action="new_reservation_traitement3.php" method="post">
<table width="769" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30">&nbsp;</td>
</tr>
<tr>
<td height="20"><img src="images/reservation/titre2.gif" width="734" height="31"><br></td>
</tr>
<tr>
<td height="50" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="681">
<tbody>
<tr>
<td width="29">&nbsp;</td>
<td height="30" width="139"><span class="style15 style19 style18"><strong>Civilit&eacute; : </strong></span></td>
<td height="30" width="144"><span class="style19 style19 style15">
<select name="civilite">
<option selected> </option>
<option>Madame</option>
<option>Mademoiselle</option>
<option>Monsieur</option>
</select>
</span></td>
<td height="30" width="16"><span class="style15"></span></td>
<td height="30" width="192"><span class="style15"></span></td>
<td height="30" width="161"><span class="style15"></span></td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td height="30" width="139"><span class="style15 style19 style18"><strong>Nom : </strong></span></td>
<td height="30" width="144"><input name="nom" class="style19 style15" value=""></td>
<td height="30"><span class="style15"></span></td>
<td height="30" width="192"><span class="style15 style19"><strong>Pr&eacute;nom : </strong></span></td>
<td height="30" width="161"><input name="prenom" class="style19 style15" value=""></td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td height="30" width="139"><span class="style18 style19 style15">Date de naissance :</span></td>
<td height="30" width="144"><input name="naissance" class="style19 style15" value=""></td>
<td height="30"><span class="style15"></span></td>
<td height="30" width="192"><span class="style15 style19"><strong>Mail : </strong></span></td>
<td height="30" width="161"><input name="mail" class="style19 style15" value=""></td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td height="40" width="139" valign="top"><span class="style15 style19 style18"><strong>Adresse : </strong></span></td>
<td colspan="4" height="40" valign="middle"><span class="style19 style19 style15">
<textarea name="adresse" cols="30"></textarea>
<img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" alt="" height="1" width="20"> </span></td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td height="30" width="139"><span class="style15 style19 style18"><strong>Code postal : </strong></span></td>
<td height="30" width="144"><input name="code_postal" class="style19 style15" value=""></td>
<td height="30"><span class="style15"></span></td>
<td height="30" width="192"><span class="style15 style19"><strong>Ville : </strong></span></td>
<td height="30" width="161"><input name="ville" class="style19 style15" value=""></td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td height="30" width="139"><span class="style15 style19 style18"><strong>Pays : </strong></span></td>
<td height="30" width="144"><input name="pays" class="style19 style15" value=""></td>
<td height="30"><span class="style15"></span></td>
<td height="30" width="192"><span class="style19 style19 style15">GSM : </span></td>
<td height="30" width="161"><input name="gsm" class="style19 style15" value=""></td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td height="30" width="139"><span class="style18 style19 style15">T&eacute;l&eacute;phone : </span></td>
<td height="30" width="144"><input name="tel" class="style19 style15" value=""></td>
<td height="30"><span class="style15"></span></td>
<td height="30" width="192"><span class="style19 style19 style15">Fax : </span></td>
<td height="30" width="161"><input name="fax" class="style19 style15" value=""></td>
</tr>
<tr>
<td>&nbsp;</td>
<td height="30">&nbsp;</td>
<td height="30">&nbsp;</td>
<td height="30">&nbsp;</td>
<td height="30">&nbsp;</td>
<td height="30">&nbsp;</td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td height="50" valign="top"><img src="images/reservation/hebergement.gif" width="734" height="31"></td>
</tr>
<tr>
<td height="50" valign="top"><table cellspacing="0" cellpadding="0">

<tr>
<td width="27" height="30">&nbsp;</td>
<td width="149" height="30"><span class="style26">R&eacute;servation au nom de </span></td>
<td colspan="2" height="30"><input name="nom_reservation" value=""></td>
<td width="167" height="30"><span class="style19">
<input name="hotel" type="hidden" id="hotel" value="Hotel Hamamet">
</span></td>
</tr>
<tr>
<td height="30">&nbsp;</td>
<td height="30"><span class="style26">Nombre de personne(s) </span></td>
<td width="158" height="30"><input name="nbr_personne" type="text" value=""></td>
<td colspan="2" height="30"><span class="style19"></span></td>
</tr>
<tr>
<td height="30">&nbsp;</td>
<td height="30"><span class="style26">Nombre de chambre(s)</span></td>
<td height="30"><span class="style19"></span></td>
<td width="166" height="30"><span class="style19"></span></td>
<td height="30"><span class="style19"></span></td>
</tr>
<tr>
<td height="30">&nbsp;</td>
<td height="30"><span class="style18">Single(s)</span></td>
<td height="30"><input name="single" type="text" value="" size="16" maxlength="12"></td>
<td height="30"><span class="style18">Double(s)
<input name="double" size="16" value="" type="text">
</span></td>
<td height="30"><span class="style18"> Triple(s)
<input name="triple" size="15" value="" type="text">
</span></td>
</tr>
<tr>
<td height="30">&nbsp;</td>
<td height="30"><span class="style18"><strong>Votre s&eacute;jour du </strong></span></td>
<td height="30"><span class="style18">
<input name="debut_sejour" size="16" value="" type="text">
<!-- // create calendar object(s) just after form tag closed // specify form element as the only parameter (document.forms['formname'].elements['inputname']); // note: you can have as many calendar objects as you need for your application var cal2 = new calendar1(document.forms['form1'].elements['debut_sejour']); cal2.year_scroll = false; cal2.time_comp = false; //-->
</span></td>
<td height="30"><span class="style18"><strong>au</strong> <img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" height="1" width="1">
<input name="fin_sejour" size="16" value="" type="text">
<!-- // create calendar object(s) just after form tag closed // specify form element as the only parameter (document.forms['formname'].elements['inputname']); // note: you can have as many calendar objects as you need for your application var cal3 = new calendar1(document.forms['form1'].elements['fin_sejour']); cal3.year_scroll = false; cal3.time_comp = false; //-->
</span></td>
<td height="30"><span class="style19"></span></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="50" valign="top"><img src="images/reservation/res_golf.gif" width="734" height="31"></td>
</tr>
<tr>
<td height="50" valign="top"><table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="732" height="58"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="186" bgcolor="#348F21"><img src="http://www.accueilsoins-tunisie.com/images/tarifs/golf_yasmine_2.jpg" height="58" width="246"></td>
<td bgcolor="#348F21" width="14">&nbsp;</td>
<td bgcolor="#348F21" width="498"><span class="style32">GOLF D'HAMMAMET </span></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" width="732">
<tbody>
<tr>
<td height="10" valign="top"></td>
<td rowspan="2" valign="top" width="12"><img src="http://www.accueilsoins-tunisie.com/images/hotel/barre_gris.gif" height="120" width="1"></td>
<td valign="top"></td>
</tr>
<tr>
<td valign="top" width="246"><table border="0" cellpadding="0" cellspacing="0" width="246">
<tbody>
<tr>
<td width="85"><span class="style15 style19"><strong>Green fee: </strong></span></td>
<td height="35" width="161"><span class="style15 style19">
<select name="green_fee">
<option selected="selected"> Sans Green Fee</option>
<option> 1 / 2 Green Fee</option>
<option>1 Green Fee</option>
<option>2 Green Fee</option>
<option>4 Green Fee</option>
<option>5 Green Fee</option>
<option>Offre sp&eacute;ciale 5 GS</option>
</select>
</span></td>
</tr>
<tr>
<td height="25"><span class="style15 style19"><strong>Le&ccedil;ons :</strong></span></td>
<td height="25"><span class="style15 style19">
<select name="lesson">
<option>Pas de le&ccedil;on</option>
<option>le&ccedil;on indiv</option>
<option>le&ccedil;on en groupe</option>
</select>
</span></td>
</tr>
</tbody>
</table></td>
<td valign="top" width="474"><table border="0" cellpadding="0" cellspacing="0" width="440"><tbody><tr><td height="25"><table border="0" cellpadding="0" cellspacing="0" width="440">
<tbody>
<tr>
<td height="35" class="style31">Equipement :</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td height="35">&nbsp;</td>
<td height="35">&nbsp;</td>
<td height="35">&nbsp;</td>
</tr>
<tr>
<td height="25" width="116"><span class="style30">Buggy 18 trous </span></td>
<td height="25" width="34"><input name="buggy_18" type="checkbox" value="Oui"></td>
<td height="25" width="107"><span class="style30">Buggy 9 trous</span></td>
<td height="25" width="33"><input name="buggy_9" type="checkbox" value="Oui"></td>
<td height="25" width="128"><span class="style30">Full set of clubs </span></td>
<td height="25" width="22"><input name="full" value="Oui" type="checkbox"></td>
</tr>
<tr>
<td height="25"><span class="style30">1/2 set of clubs</span></td>
<td height="25"><input name="demi_set" type="checkbox" value="Oui"></td>
<td height="25"><span class="style30">Trolley 18 trous </span></td>
<td height="25"><input name="trolley_18" type="checkbox" value="Oui"></td>
<td height="25"><span class="style30">15 driving-range balls</span></td>
<td height="25"><input name="driving_range_15" value="Oui" type="checkbox"></td>
</tr>
<tr>
<td height="25"><span class="style30">practice fee </span></td>
<td height="25"><input name="practice_fee" type="checkbox" value="Oui"></td>
<td height="25"><span class="style30">caddy</span></td>
<td height="25"><input name="caddy" type="checkbox" id="caddy" value="Oui"></td>
<td height="25">&nbsp;</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="50" valign="top"><img src="images/reservation/res_thalasso.gif" width="734" height="31"></td>
</tr>
<tr>
<td height="50" valign="top"><table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="732" height="58"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="186" bgcolor="#0095D5"><img src="images/tarifs/thalasso_hammamet_2.jpg" height="58" width="246"></td>
<td bgcolor="#0095D5" width="14">&nbsp;</td>
<td bgcolor="#0095D5" width="498"><span class="style32">CURES DE BIEN-&Ecirc;TRE &Agrave; HAMMAMET</span></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="38%" bgcolor="#0095D5"><span class="texte_petit style6">NOM DE CURE</span></td>
<td width="21%" bgcolor="#0095D5"><div align="center" class="texte_petit style5 style10">nombre de cure(s) 2 jours</div></td>
<td width="20%" bgcolor="#0095D5"><div align="center" class="texte_petit style5 style10">nombre de cure(s) 4 jours</div></td>
<td width="21%" bgcolor="#0095D5"><div align="center" class="texte_petit style5 style10">nombre de cure(s) 5 jours</div></td>
</tr>
<tr>
<td><span class="texte_petit style5"><strong>CURES CLASSIQUES</strong><br>
<img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" alt="" height="1" width="10">Orientale, Bien-&ecirc;tre, Volupta, Remise en forme</span></td>
<td><div align="center"><span class="style5"></span>
<input name="cure_classique2j" type="text" id="cure_classique2j" size="5" maxlength="3">
</div></td>
<td><div align="center"><span class="style5"></span>
<input name="cure_classique4j" type="text" id="cure_classique4j" size="5" maxlength="3">
</div></td>
<td><div align="center"><span class="style5"></span>
<input name="textfield4" type="text" id="textfield4" size="5" maxlength="3" style="background-color:#FF0000" disabled>
</div></td>
</tr>
<tr>
<td><span class="texte_petit style5"><strong>CURES SPECIFIQUES</strong><br>
<img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" alt="" height="1" width="10">Fitonic, Minceur, Anti-stress, Jambes l&eacute;g&egrave;res</span></td>
<td><div align="center"><span class="style5"></span>
<input name="textfield6" type="text" id="textfield6" size="5" maxlength="3" style="background-color:#FF0000" disabled>
</div></td>
<td><div align="center"><span class="style5"></span>
<input name="textfield5" type="text" id="textfield5" size="5" maxlength="3" style="background-color:#FF0000" disabled>
</div></td>
<td><div align="center"><span class="style5"></span>
<input name="cure_specifique5j" type="text" id="cure_specifique5j" size="5" maxlength="3">
</div></td>
</tr>
<tr>
<td bgcolor="#0095D5"><span class="texte_petit style7"><span class="style8">SOINS BIEN-&Ecirc;TRE</span></span></td>
<td bgcolor="#0095D5">&nbsp;</td>
<td bgcolor="#0095D5">&nbsp;</td>
<td bgcolor="#0095D5">&nbsp;</td>
</tr>
<tr>
<td><span class="texte_petit style5"><img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" alt="" height="1" width="10"><strong>SOINS D&rsquo;HYDROTHERAPIE</strong></span></td>
<td><div align="center"><span class="style5"></span>
<select name="soins_hydro" id="soins_hydro" style="width:150px">
<option value="Aucun" selected>Aucun</option>
<option value="Forfait FORME (35&euro;)">Forfait FORME (35&euro;)</option>
<option value="Forfait RELAX (40&euro;)">Forfait RELAX (40&euro;)</option>
</select>
</div></td>
<td><div align="center"><span class="style5"></span></div></td>
<td><div align="center"><span class="style5"></span></div></td>
</tr>
<tr>
<td><span class="texte_petit style5"><img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" alt="" height="1" width="10"><strong>MASSAGES</strong></span></td>
<td><div align="center"><span class="style5"></span>
<select name="soins_massages" id="soins_massages" style="width:150px">
<option value="Aucun" selected>Aucun</option>
<option value="Massage complet (30m - 18&euro;)">Massage complet (30m - 18&euro;)</option>
<option value="Massage complet (50m - 28&euro;)">Massage complet (50m - 28&euro;)</option>
<option value="Massage chinois du dos (30m - 25&euro;)">Massage chinois du dos (30m - 25&euro;)</option>
</select>
</div></td>
<td><div align="center"><span class="style5"></span></div></td>
<td><div align="center"><span class="style5"></span></div></td>
</tr>
<tr>
<td><span class="texte_petit style5"><img src="http://www.accueilsoins-tunisie.com/images/spacer.gif" alt="" height="1" width="10"><strong>RELAXATION COR&Eacute;ENE</strong></span></td>
<td><div align="center"><span class="style5"></span>
<select name="soins_relaxation_coreene" id="soins_relaxation_coreene" style="width:150px">
<option value="Aucun" selected>Aucun</option>
<option value="Relaxation cor&eacute;ene (60m - 45&euro;)">Relaxation cor&eacute;ene (60m - 45&euro;)</option>
</select>
</div></td>
<td><div align="center"><span class="style5"></span></div></td>
<td><div align="center"><span class="style5"></span></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" valign="top"><p>&nbsp;</p>
<p><img src="images/reservation/res_chirurgie.gif" width="734" height="31"></p></td>
</tr>
<tr>
<td height="50" valign="top"><div align="center">
<p>
<input type="radio" name="res_chirurgie" id="radio" value="Oui">
<span class="texte_petit style15">J'ai d&eacute;ja pris contact avec le chirurgien en remplissant le formulaire dans la page chirugie esth&eacute;tique et j'ai re&ccedil;u sa r&eacute;ponse et son diagnostic op&eacute;ratoire</span></p>
<p class="style11 style5"> Vous ne pourrez acc&eacute;der &agrave; la r&eacute;servation de votre s&eacute;jour "chirurgie esth&eacute;tique" si cette &eacute;tape n'a pas &eacute;t&eacute; franchie. </p>
</div></td>
</tr>
<tr>
<td height="50" valign="top"><p>&nbsp;</p>
<p align="center">
<input type="submit" name="button" id="button" value="Terminer ma reservation" style="width:300px; background-color:#00CCFF; color:#FFFFFF; cursor:pointer">
<br>
<br>
</p></td>
</tr>
</table>
</form>
Blue Star Investment
Keika
le 18/04/2008 à 17:30
Keika
je ne parlais pas de ton formulaire, mais de ta base, exemple, si dans ton tuple pour les date tu as mis INT au lieu de DATE ca va poser une soucis si tu mets une date comme ceci : 12/04/08 parceque les slashes ne sont pas des chiffres...
Le PHP --> C'est dur !
zOy
le 18/04/2008 à 19:01
zOy
voici la structure de ma table sql

CREATE TABLE IF NOT EXISTS `reservation_work1` (
`civilite` varchar(255) NOT NULL,
`nom` varchar(255) NOT NULL,
`prenom` varchar(255) NOT NULL,
`naissance` varchar(255) NOT NULL,
`mail` varchar(255) NOT NULL,
`adresse` text NOT NULL,
`code_postal` varchar(255) NOT NULL,
`ville` varchar(255) NOT NULL,
`pays` varchar(255) NOT NULL,
`gsm` varchar(255) NOT NULL,
`tel` varchar(255) NOT NULL,
`fax` varchar(255) NOT NULL,
`nom_reservation` varchar(255) NOT NULL,
`hotel` varchar(255) NOT NULL,
`nbr_personne` varchar(255) NOT NULL,
`single` varchar(255) NOT NULL,
`double` varchar(255) NOT NULL,
`triple` varchar(255) NOT NULL,
`debut_sejour` varchar(255) NOT NULL,
`fin_sejour` varchar(255) NOT NULL,
`green_fee` varchar(255) NOT NULL,
`lesson` varchar(255) NOT NULL,
`buggy_18` varchar(255) NOT NULL default 'Non',
`buggy_9` varchar(255) NOT NULL default 'Non',
`full` varchar(255) NOT NULL default 'Non',
`demi_set` varchar(255) NOT NULL default 'Non',
`trolley_18` varchar(255) NOT NULL default 'Non',
`driving_range_15` varchar(255) NOT NULL default 'Non',
`practice_fee` varchar(255) NOT NULL default 'Non',
`caddy` varchar(255) NOT NULL default 'Non',
`cure_classique2j` varchar(255) NOT NULL default 'Non',
`cure_classique4j` varchar(255) NOT NULL default 'Non',
`cure_specifique5j` varchar(255) NOT NULL default 'Non',
`soins_hydro` varchar(255) NOT NULL,
`soins_massages` varchar(255) NOT NULL,
`soins_relaxation_coreene` varchar(255) NOT NULL,
`res_chirurgie` varchar(255) NOT NULL default 'Non'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


est-ce plus claire comme çà ? pour moi c noir de chez noir :s
Blue Star Investment
LupusMic
le 18/04/2008 à 20:39
LupusMic
1 - ton script est une passoire
2 - il n'y a aucun travail d'analyse
3 - il n'y a aucune bonne pratique

J'espère que la personne a qui tu as vendu la prestation n'a pas payé trop chère...
Développeur récurrent, procédural et relationnel. Caustique soupe-au-lait.
Keika
le 19/04/2008 à 03:34
Keika
LupusMic a raison, ca pique les yeux ton truc ! T'as meme pas d'id pour chaque entrees, je me demande comment tu fais pour modifier les entrees... m'enfin.

Comme je pensais (mais je me disais que c'etait super bete) tu as un NOT NULL sur tes deux tuples DOUBLE et triple. Si tu ne comprends pas l'anglais, ca veut dire que la valeur entree ne peut pas etre inexistante. Donc mysql s'attends a recevoir des infos, c'est de la protection. Donc soit tu jartes le NOT NULL soit tu forces a remplir (par un 0 par exemple)

Mais je recommande que tu revois toute ta table, mettre varchar 255 partout c'est bete. Tu as des dates, dont mets date, tu as des entrees qui ne seront que des chiffres, donc met INT... enfin je sias pas, travaille la un peu plus ta table...
Le PHP --> C'est dur !
Répondre

Ecrire un message

Votre message vient d'être créé avec succès.
LoadingChargement en cours