【发布时间】:2023-03-18 22:14:01
【问题描述】:
很抱歉,对 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();陈述 任何帮助都会很棒。
【问题讨论】: