尝试将数据添加到 mySQL 数据库。
我收到这个错误:
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 'MATCH(time, date, location, weather, team_id) VALUES('t', 't', 't','t','2')'
这是 PHP 代码片段:
$sql = "insert into MATCH(time, date, location, weather, team_id) VALUES('$time', '$date', '$location','$weather','$team_id')";
我看不到任何语法错误
最佳答案
MATCH 是为全文搜索中使用的函数保留的:
http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html
这不是 php 语法错误。这是一个 Mysql 语法错误。我建议更改表的名称。
关于将数据添加到 MySQL 数据库的 PHP 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21415709/