首页 » 二次开发 » 数据库 » 阅读文章
为ECSHOP增加积分计划,数据库
—
— 表的结构 `ecs_integral`
—
CREATE TABLE IF NOT EXISTS `ecs_integral` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` mediumint(8) unsigned NOT NULL,
`type_id` smallint(5) unsigned NOT NULL,
`num` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`times` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
—
— 表的结构 `ecs_integral_type`
—
CREATE TABLE IF NOT EXISTS `ecs_integral_type` (
`type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`type_name` varchar(80) DEFAULT NULL,
`type_score` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`type_num` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`type_time` tinyint(1) unsigned NOT NULL DEFAULT ‘3’,
PRIMARY KEY (`type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
—
— 转存表中的数据 `ecs_integral_type`
—
INSERT INTO `ecs_integral_type` (`type_id`, `type_name`, `type_score`, `type_num`, `type_time`) VALUES
(1, ‘每天登录送积分’, 10, 2, 4)
评论 共0条 (RSS 2.0) 发表评论