我正在使用php-login.net项目文件来获取一个小小的webapp。我只是尝试连接到m db并插入一些东西,但我不断得到这个奇怪的错误,我无法弄清楚。这段代码中缺少什么
$query = $db->prepare('INSERT INTO cours (category, title, description, places, price) VALUES (:category, :title, :description, :places, :price');
$query->execute(array(':category' => $category, ':title' => $title, ':decription' => $decription, ':places' => $places, ':price' => $price));
答案 0 :(得分:1)
description
decription
()
)的错误也被:price
丢失了
$query = $db->prepare('INSERT INTO cours (category, title, description, places, price) VALUES (:category, :title, :description, :places, :price)');
$query->execute(array(':category' => $category, ':title' => $title, ':description' => $description, ':places' => $places, ':price' => $price));
你能现在试试并告诉我们它是否有效吗?