ECSHOP网店系统提示MYSQL SERVER ERROR REPORT的解决方法
-
help
2017-12-26 17:40
今天帮一用户迁入ECSHOP商城网站进来,搬迁成功后刷新页面,在页面底部提示:
错误提示:MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => DELETE FROM `sqlxaled`.`ecs_sessions_data` WHERE expiry < 1514278768 ) [2] => Array ( [error] => Table 'sqlxaled.ecs_sessions_data' doesn't exist ) [3] => Array ( [errno] => 1146 ) )
刷新一下,上面提示又没有了,再刷新一下又出现了
看上面错误提示是因为当初通过ECSHOP后台备份时,少了两个表,一个是 ecs_sessions ,一个是 ecs_sessions_data。既然是少了两张表,那么我们想法给他重新建立就OK了呗。下面讲下方法:
分别将下面两段SQL语句复制粘贴到“ECSHOP后台 》数据库管理 》SQL查询”的输入框里提交即可。
或者在PHPMYADMIN里执行SQL查询,输入下面内容
----------------------------------------------------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `ecs_sessions` (
`sesskey` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`expiry` int(10) unsigned NOT NULL DEFAULT '0',
`userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`adminid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ip` char(15) NOT NULL DEFAULT '',
`user_name` varchar(60) NOT NULL,
`user_rank` tinyint(3) NOT NULL,
`discount` decimal(3,2) NOT NULL,
`email` varchar(60) NOT NULL,
`data` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`sesskey`),
KEY `expiry` (`expiry`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `ecs_sessions_data` (
`sesskey` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`expiry` int(10) unsigned NOT NULL DEFAULT '0',
`data` longtext NOT NULL,
PRIMARY KEY (`sesskey`),
KEY `expiry` (`expiry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--------------------------------------------------------------------------------------------------------------
执行上面代码后,问题解决!