php - SQL错误(1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax

标签 php mysql database heidisql

我有一个名为 live.sql 的 sql 文件,我想在 heidiSQL 中导入我的数据库,但是当我导入此文件时,它会出现以下错误。

SQL Error (1064): 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 'þFFvar/www/html/live/databases/012017/live_01_11_2017.sql
' at line 1

如何修复此错误?

enter image description here

最佳答案

该错误表示sql查询不正确。通过在行首添加 2 个破折号 (--) 注释掉第 1 行。

关于php - SQL错误(1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41693746/

相关文章:

javascript - 没有页面刷新的 AJAX 到 PHP

php - 使用 PHP PDO 从 sql 查询中获取数据很困难

php - 使用 SQL 和 PHP 从不同表中搜索数据

php - 将 base64 转换为 base62(不含特殊字符)

mysql - GROUP BY 成固定大小的 block (使用 MySQL)

java - 是否有在 Spring Boot 上下文中查询巨大 CSV 的最佳实践?

编译时出现 android.database.sqlite.SQLiteException : near "20": syntax error (code 1): ,:从数据 = 19/04/2015 20:59 处的意外删除

php数组按多组分组

MySQL 数据库在 Apache Solr 上建立索引,如何通过 URL 访问它

php - 访问添加到表中的最后一行 - PHP