我正在尝试运行此代码以在“问题”表中插入新行:
$sql = "INSERT INTO questions (id,quiz_id,question,image,type,option,answer,explanation,date)
VALUES (:id, :quiz_id, :question, :imagesstring, :type, :optionsstring, :answer, :explanation, :date)";
$query = $db->prepare($sql);
$results = $query->execute(array(
":id" => $id,
":quiz_id" => $quiz_id,
":question" => $question,
":imagesstring" => $imagesstring,
":type" => $type,
":optionsstring" => $optionsstring,
":answer" => $answer,
":explanation" => $explanation,
":date" => $date
));
它说附近有语法错误,但我找不到。我多次检查表格,列与我插入的变量相对应。变量也具有分配给它们的正确值。请帮忙。