当点击不同的口味时,价格改变(数据库设计)

--当点击口味时改变价格(两表联合
select * from GoodsTable inner join FlavorTable on GoodsTable.Id=FlavorTable.Id where FId=3
--跳页时根据Goods(字段)绑定出”物品、口味、价格“
select * from GoodsTable inner join FlavorTable on GoodsTable.Id=FlavorTable.Id where Goods='咖啡'

--当点击口味时改变价格(三表联合
select * from GoodsTable inner join FlavorTable on GoodsTable.Id=FlavorTable.Id inner join PriceTable on FlavorTable.PId=PriceTable.PId where Goods='咖啡'
--跳页时根据Goods(字段)绑定出”物品、口味、价格“
select * from GoodsTable inner join FlavorTable on GoodsTable.Id=FlavorTable.Id inner join PriceTable on FlavorTable.PId=PriceTable.PId where FId=3

表设计如下三张图片,分别为:物品表、口味表、价格表

当点击不同的口味时,价格改变(数据库设计)当点击不同的口味时,价格改变(数据库设计)当点击不同的口味时,价格改变(数据库设计)