首先把需求分析搞清楚
主要实现两个功能
1、会员管理,设置成为会员的要求
2、添加商品时,可设置会员优惠价格
具体实现
1、建表【会员级别限定表p39_member_level{Id,级别名称,积分下限,积分上限}、会员价格表p39_member_price{会员价格,积分Id,商品Id}】
drop table if exists p39_member_level; create table p39_member_level ( id mediumint unsigned not null auto_increment comment 'Id', level_name varchar(30) not null comment '级别名称', jifen_bottom mediumint unsigned not null comment '积分下限', jifen_top mediumint unsigned not null comment '积分上限', primary key (id) )engine=InnoDB default charset=utf8 comment '会员级别';