php 数据插入mysql数据库出错

2025-06-22 09:04:57
推荐回答(1个)
回答1:

数据库语句出错
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’table (id, number, type) VALUES (’5',‘123456','5')‘ at line 1
翻译:你有SQL语句有语法错误,请对照你的MySQL服务器版本使用的正确语法来修改,你的语法错误在第一行:“table (id, number, type) VALUES (’5',‘123456','5') ”

我知道了 就是在VALUES ('$a','$txt','$a')
这段有问题。

你输出一下,是不是有错

还有你的id是什么类型的。为什么要打上单引号呢