我正在尝试将SQL文件导入MySQL Server 5.5,但我一直收到此错误:
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 ''a:10:{i:0'
这是查询:
insert into `preferences` values ('system','active_plugins','a:10:{i:0;s:16:\"voting/index.php\";i:1;s:26:\"social_bookmarks/index.php\";i:2;s:25:\"profile_picture/index.php\";i:3;s:26:\"lz_theme_options/index.php\";i:4;s:21:\"google_maps/index.php\";i:5;s:17:\"youtube/index.php\";i:6;s:18:\"facebook/index.php\";i:7;s:23:\"lz_demo_theme/index.php\";i:8;s:25:\"cars_attributes/index.php\";i:9;s:20:\"lz_firephp/index.php\";}','STRING'),
所以我认为这是一些编码问题,因为它在分号上抛出错误,所以我检查了,一切都是utf-8。最奇怪的是,如果我通过phpmyadmin或navycat甚至mysqlworkbench运行相同的查询,则只会在服务器处理错误时抛出错误。
答案 0 :(得分:0)
''a:10:{i:0'
作为错误,查询结束时,不应该。
非常感谢所有的帮助,希望我缺乏关注服务器的其他人! RSRS