0
我試圖運行此代碼在我的「問題」表中插入新行:PHP的PDO插入查詢錯誤
$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
));
它說有一個語法錯誤接近,但我不能找到它。我多次檢查表格,並且列與我插入的變量相對應。變量也有適當的值賦予它們。請幫忙。