Insérer des valeurs dans une table
Bonjour,
J'ai fait une requête INSERT semblable à celles que j'ai déjà faites et qui fonctionnent, mais celle-ci ne fonctionne pas, j'ai beau vérifié et revérifié les valeurs et les champs, je ne trouve pas l'erreur sur la ligne 12 !
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <?php
/*--------Connexion à la BDD----------------*/
try{
$bdd=new PDO('mysql:host=localhost;dbname=croix_rouge;charset=utf8','croix_rouge','admin');
}
catch(Exception $e){
die('Erreur:' .$e->getMessage());
}
$bdd->exec("INSERT INTO personne VALUES (null,'a','b','c','3','3','3','a@a.fr','3','gg','2015-04-24 09:58:09','2015-04-24 09:58:09','5')"); //Requête fonctionne
$bdd->exec("INSERT INTO categorisation VALUES (null,6,3,2,2,4,5,2,1,3,3,2,3)") or $bdd->errorInfo() ; //Requête ne fonctionne pas
?> |
Table categorisation :
id_categori int(11) Primaire AI
id_struct int(11) Foreign Key
id_nationalite int(11) //
id_statut_conflit int(11) //
id_etat int(11) //
id_sepulture int(11) //
id_sexe int(11) //
id_age int(11) //
id_particularite int(11) //
id_confession int(11) //
id_institution int(11) //
id_administrative int(11) //
id_aide_sociale int(11) //