我看到很多人有这个问题,但所有的答案总是指向计数与值计数不匹配,但他们都有 9 个项目,所以不知道为什么它给我这样的错误?猜猜我错过了明显的?
$sth = "INSERT INTO `docs` (title, ref, rev, content, owner, contract_id, cat_id, created, updated)
VALUES (:title, :ref, :rev, :content, :owner, :contract :cat, NOW(), NOW())";
$q = $conn->prepare($sth);
$q->execute(array(':title'=>$title, ':ref'=>$ref, ':rev'=>$rev, ':content'=>$contnet, ':owner'=>$owner, ':contract'=>$contract, ':cat'=>$cat));