Reputation: 11
Where is my problem? thks i don't understand
Warning: PDOStatement::execute(): SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1 in C:\wamp32\www\patest\includes\functions_mysql.php on line 1803
line 1803
$sql = "INSERT INTO ". PREFIX ."comptes VALUES( :reg, :dep, :cat, :nom_ent, :siret, :civilite, :nom, :prenom, :adresse, :code_postal, :ville, :tel, :email, :password, :dossier_rss, :ip, NOW(), :type, :etat)";
$req = $bdd->prepare($sql);
$req->bindValue('reg', $array['reg'], PDO::PARAM_INT);
$req->bindValue('dep', $dep, PDO::PARAM_INT);
$req->bindValue('cat', $cat, PDO::PARAM_INT);
$req->bindValue('nom_ent', $ent, PDO::PARAM_INT);
$req->bindValue('siret', $sir, PDO::PARAM_INT);
$req->bindValue('civilite', $array['civ'], PDO::PARAM_INT);
$req->bindValue('nom', $array['nom'], PDO::PARAM_INT);
$req->bindValue('prenom', $array['prenom'], PDO::PARAM_INT);
$req->bindValue('adresse', $array['add'], PDO::PARAM_INT);
$req->bindValue('code_postal', $cod , PDO::PARAM_INT);
$req->bindValue('ville', $vil, PDO::PARAM_INT);
$req->bindValue('tel', $tel, PDO::PARAM_INT);
$req->bindValue('email', $array['ema'], PDO::PARAM_INT);
$req->bindValue('password', $pas, PDO::PARAM_INT);
$req->bindValue('dossier_rss', $dossier_rss, PDO::PARAM_INT);
$req->bindValue('ip', $array['ip'], PDO::PARAM_INT);
$req->bindValue('type', $type, PDO::PARAM_INT);
$req->bindValue('etat', $etat, PDO::PARAM_INT);
$req->execute();
Upvotes: 1
Views: 168