SQLSTATE [21S01]:插入匹配列列表:1136第1行的列值计数

时间:2018-04-09 21:11:47

标签: php syntax-error row multiple-columns mysql-error-1136

我的问题在哪里?我不明白

警告:PDOStatement :: execute():SQLSTATE [21S01]:插入值列表与列列表不匹配:1136列计数与C:\ wamp32 \ www \ patest \ includes \中第1行的值计数不匹配第1803行的functions_mysql.php

第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();

0 个答案:

没有答案