HI,我是一个PHP新手,今天一个问题折腾了一上午,请大家帮我看一下,万分感谢
PHP code1 | <!--Code highlighting produced by Actipro CodeHighlighter (freeware)http:
|
Copier après la connexion
这是来自PHP和 MySQL web开发(第四版)中的一段代码。
我想问的是为什么最后总是输出An error has occurred.The item was not added
而且插入结果$result = -1
请大家指点一下
------解决方案-------------------- $query = "insert into books values ('$isbn', '$author', '$title', '$price')";
echo $query;
$result = $db->query($query) or die($db->error);