Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] D7.2升级到X2版数据转换过程中出现了1146的错误,请求高手指点

[复制链接]
爱上我 发表于 2011-11-17 18:33:29 | 显示全部楼层 |阅读模式
本帖最后由 爱上我 于 2011-11-17 19:38 编辑



MySQL Error
Message: query_error
SQL: TRUNCATE `XXXXX`.uce_forum_attachmentfield
Error: Table XXXXX uce_forum_attachmentfield' doesn't exist
Errno.: 1146
Click here to seek help.

PHP Backtrace
File Line Class Type Function
include/db.class.php 102  db_mysql -> halt
source/d7.2_x1.5/table/attachmentfields.php 20  db_mysql -> query
include/do_convert.inc.php 54    require
index.php 36    require

去数据库看了下uce_forum_attachment存在,uce_forum_attachmentfield
这个不存在
12153556 发表于 2011-11-17 18:39:31 | 显示全部楼层
本帖最后由 12153556 于 2011-11-17 18:43 编辑

建议在本地转换

提示这个表不存在,重新创建这个表试试

备份好数据,执行下面的代码:

  1. DROP TABLE IF EXISTS pre_forum_attachmentfield;
  2. CREATE TABLE pre_forum_attachmentfield (
  3.   aid mediumint(8) unsigned NOT NULL,
  4.   tid mediumint(8) unsigned NOT NULL DEFAULT '0',
  5.   pid int(10) unsigned NOT NULL DEFAULT '0',
  6.   uid mediumint(8) unsigned NOT NULL DEFAULT '0',
  7.   description varchar(255) NOT NULL,
  8.   PRIMARY KEY (aid),
  9.   KEY tid (tid),
  10.   KEY pid (pid,aid),
  11.   KEY uid (uid)
  12. ) TYPE=MyISAM;
复制代码

注意表前缀
回复

使用道具 举报

 楼主| 爱上我 发表于 2011-11-17 18:45:09 | 显示全部楼层
我是菜鸟,不会重建啊,楼上大大给个脚本
回复

使用道具 举报

12153556 发表于 2011-11-17 18:49:34 | 显示全部楼层
进入phpmyadmin,选择你的数据库,再点“SQL”,把上面的代码复制到方框里,然后点“执行”就可以了
回复

使用道具 举报

 楼主| 爱上我 发表于 2011-11-17 19:36:43 | 显示全部楼层
太感谢了,搞定了
回复

使用道具 举报

ivwtak 发表于 2011-11-21 06:47:03 | 显示全部楼层
你你你你 呵呵~~~~别这样哦.....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-30 16:18 , Processed in 0.103061 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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