抱歉,对 PHP 和 mySQL 很陌生。
这是错误所指的代码。
$query = 'INSERT INTO movies
(title, year, actor, notes, category)
VALUES
(:code, :name, :price, :notes, :category_id)';
$statement = $db->prepare($query);
$statement->bindValue(':title', $code);
$statement->bindValue(':year', $name);
$statement->bindValue(':actor', $price);
$statement->bindValue(':notes', $notes);
$statement->bindValue(':category', $category_id);
$statement->execute();
$statement->closeCursor();
错误是指execute(); 声明任何帮助都会很棒。