网络实验室

 找回密码
 注册账户
查看: 11251|回复: 30

求助,棋子发的游戏站程序数据库导入不了。

[复制链接]
mulangren 发表于 2007-9-22 16:22:52 | 显示全部楼层 |阅读模式
带3700个数据的flash游戏站 【附截图和演示】
http://www.labs.net.cn/viewthread.php?tid=80&extra=page=11

2个多G的flash包终于下完了,但那个1.3M的sql数据库怎么也导不进去,求助下大家啊。

先正常安装完站,然后在phpmyadmin导入数据库,没反应,开始以为是数据客太大超时,我把里面的数据删的剩2条,显示错误。
试着查询里面的语句,也显示错误。是我哪里搞错了把。。

INSERT INTO `gs_games` ('gId', 'gInCategory', 'gSwfFile', 'gName', 'gOrder', 'gVisible', 'gThumb', 'gWidth', 'gHeight', 'gDescription', 'gplays', 'description2', 'des2', 'filetype') VALUES (),
INSERT INTO `gs_games` ('gId', 'gInCategory', 'gSwfFile', 'gName', 'gOrder', 'gVisible', 'gThumb', 'gWidth', 'gHeight', 'gDescription', 'gplays', 'description2', 'des2', 'filetype') VALUES (1,101,'f-218.swf','12 Holes of X-Mas',0,1,'f-218.png',525,400,"'Pick your putter and go out to putt a hole in one.Move the ball to where you want it then click,move your mouse according to the arrow then click to shoot the ball, and play all twelve holes'",0,'','',1),

[ 本帖最后由 mulangren 于 2007-9-22 16:44 编辑 ]
 楼主| mulangren 发表于 2007-9-22 17:03:11 | 显示全部楼层
刚才查了下,#1064错误类型是不支持错误提示中的编码,

MySQL 返回:文档
#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 ''gId', 'gInCategory', 'gSwfFile', 'gName', 'gOrder', 'gVisible'
无心的棋子 发表于 2007-9-22 18:06:59 | 显示全部楼层
在LIUNX服务器中导入
用备份工具还原

本地win系统测试  安装mysql 大部分字符集不支持

比如我们的印度站
编码用本土的 在win系统mysql上还原 就会出现错误
 楼主| mulangren 发表于 2007-9-22 20:16:05 | 显示全部楼层
哦 ,我说呢,再测试去先,谢谢棋子。
 楼主| mulangren 发表于 2007-9-24 10:03:17 | 显示全部楼层
我在国外一个空间上测试的,不行啊。还有2个疑问。麻烦棋子有时间的话顺便帮我看下。
1,还没用工具导入,因为我看那些语句,INSERT INTO `gs_games`  是插入数据到 `gs_games` 这个表,但默认数据库里就没这个表,有个game表,里面的列跟 INSERT INTO 要插入数据的列也不完全一样,好像少了2列。
2,是不是我还有什么步骤没做,我是把站安装完后什么都没做,直接在PHPMYADMIN里导入这个数据库的。是不是要先建立什么栏目之类的。

刚才有人说,是MYSQL的版本不同造成的。

[ 本帖最后由 mulangren 于 2007-9-24 11:36 编辑 ]
 楼主| mulangren 发表于 2007-9-24 13:29:22 | 显示全部楼层
刚才去官方站上看了下,admin给的答案是:
Looking at the dump you have. There are several errors.

Your first insert to, after values is blank.

after that.

Code:

INSERT INTO `games` ('gId', 'gInCategory', 'gSwfFile', 'gName', 'gOrder', 'gVisible', 'gThumb', 'gWidth', 'gHeight', 'gDescription', 'gplays', 'description2', 'des2', 'filetype') VALUES (1,101,'f-218.swf','12 Holes of X-Mas',0,1,'f-218.png',525,400,"'Pick your putter and go out to putt a hole in one.Move the ball to where you want it then click,move your mouse according to the arrow then click to shoot the ball, and play all twelve holes'",0,'','',1),

this line should be:


Code:

INSERT INTO `games` ('gId', 'gInCategory', 'gSwfFile', 'gName', 'gOrder', 'gVisible', 'gThumb', 'gWidth', 'gHeight', 'gDescription', 'gplays', 'description2', 'des2', 'filetype') VALUES (1,101,'f-218.swf','12 Holes of X-Mas',0,1,'f-218.png',525,400,"'Pick your putter and go out to putt a hole in one.Move the ball to where you want it then click,move your mouse according to the arrow then click to shoot the ball, and play all twelve holes'",0,'','',1);

Basically get notepad out and do a bulk replace

Replace ), with );
 楼主| mulangren 发表于 2007-9-24 15:21:19 | 显示全部楼层
把语句里的  '  改成  `  ,不出1064提示了,但有其他错误,
把语句精简为下面的,`gSwfFile`不要的话成功导入,插入`gSwfFile`后,错误:
INSERT INTO `games` (`gId`, `gInCategory`, `gSwfFile`) VALUES (10,101,`f-218.swf`);

#1054 - Unknown column 'f-218.swf' in 'field list'

[ 本帖最后由 mulangren 于 2007-9-24 15:23 编辑 ]
 楼主| mulangren 发表于 2007-9-24 16:42:47 | 显示全部楼层
终于搞定了,NND,每一句的后部分  VALUES (10,101,`f-218`......);
里面的值都要用   "     
不知道是不是因为数据库版本的问题。

而且这个数据库和安装好的数据库里 表名也不一样,里面的字段也有几个不同

[ 本帖最后由 mulangren 于 2007-9-24 16:45 编辑 ]
您需要登录后才可以回帖 登录 | 注册账户

本版积分规则

黑屋|存档|手机|网络实验室 本站服务器由美国合租以及IDCLayer国际数据提供!!!

GMT+8, 2024-4-29 19:55 , Processed in 0.250067 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表