2009-06-08 65 views
0

此查询产生错误:MySQLi查询中的问题

您的SQL语法错误;检查对应于你的MySQL服务器版本在1号线

也许监守我累了,我没有findhing问题就在这里使用“”附近正确的语法手册...

mysqli_query($db, "INSERT INTO `tbl_bugresponse` (`id`, `bugid`, `by`, `content`, `time`) VALUES ('NULL', '$id', '$name', '$content', '$dt'") or die(mysqli_error($db)); 

谢谢:)

上的SQL

回答

0

你可能想这样的:

mysqli_query($db, "INSERT INTO `tbl_bugresponse` (`id`, `bugid`, `by`, `content`, `time`) VALUES (NULL, '$id', '$name', '$content', '$dt')") or die(mysqli_error($db)); 

此外,您提供的查询可能会受到SQL注入攻击。我建议查找参数化查询。

1

右括号丢失,你只有mysqli_query功能闭架

+0

解析错误:语法错误,在第11行的/home/radonsys/public_html/apps/viewbug.php中出现意外的')' 。 – bear 2009-06-08 22:05:43