gpt4 book ai didi

将数据添加到 MySQL 数据库的 PHP 语法错误

转载 作者:行者123 更新时间:2023-12-01 00:46:34 24 4
gpt4 key购买 nike

尝试将数据添加到 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com