2009-06-08 88 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