紧急求救,从2.62升级到2.7,数据库没有升级成功

2016-07-07 15:35 来源:www.chinab4c.com 作者:ecshop专家

我升级没有升级成功,现在其他功能基本上都可以用,就是后台有连个明显的问题。点击会员注册项出现MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT
* FROM `ty86326`.`ecs_reg_fields`ORDER BY id ) [2] => Array ( [error] => Table 'ty86326.ecs_reg_fields' doesn't exist ) [3]
=> Array ( [errno] => 1146 ) )
点击首页主广告管理就出现MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] =>
SELECT ad_id, CASE WHEN ad_type = 0 THEN '图片' WHEN ad_type = 1 THEN 'Flash' WHEN ad_type = 2 THEN '代码' WHEN ad_type = 3
THEN '文字' ELSE '' END AS type_name, ad_name, add_time, CASE WHEN ad_status = 1 THEN '启用' ELSE '关闭' END AS
status_name, ad_type, ad_status FROM `ty86326`.`ecs_ad_custom` WHERE 1 ORDER BY add_time DESC ) [2] => Array ( [error] =>
Table 'ty86326.ecs_ad_custom' doesn't exist ) [3] => Array ( [errno] => 1146 ) )

回答:
缺少表ecs_ad_custom和ecs_reg_fields
您可以参考
http://bbs.ecshop.com/viewthread.php?tid=87455&highlight=

我知道缺少这个数据表,但是这个表怎么创建啊?能纤细点吗》?

我的数据库里缺少这个表,怎么找啊?

DROP TABLE IF EXISTS `ecs_reg_fields`;
CREATE TABLE `ecs_reg_fields` (
`id` tinyint(3) unsigned NOT NULL auto_increment,
`reg_field_name` varchar(60) NOT NULL,
PRIMARY KEY(`id`)
) ENGINE=MyISAM;

DROP TABLE IF EXISTS `ecs_ad_custom`;
CREATE TABLE `ecs_ad_custom` (
`ad_id` MEDIUMINT( 8 ) UNSIGNED NOT NULL auto_increment,
`ad_type` TINYINT( 1 ) UNSIGNED DEFAULT '1' NOT NULL ,
`ad_name` VARCHAR( 60 ) ,
`add_time` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ,
`content` mediumtext,
`url` varchar(255) ,
`ad_status` TINYINT( 0 ) UNSIGNED DEFAULT '0' NOT NULL ,
PRIMARY KEY ( `ad_id` )
)ENGINE=MyISAM;

这里是两个表的建表语句,您可以在后台或者数据库中执行

谢谢,我已经退回2.62版本了,不用太高级的版本。呵呵。下次想升级的时候再升级!

谢谢,可以了! 5# 晓天