第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在電子商務網站的數據庫中創(chuàng)建產品規(guī)格表

如何在電子商務網站的數據庫中創(chuàng)建產品規(guī)格表

PHP
元芳怎么了 2022-07-16 09:54:47
我正在從事電子商務項目,在數據庫上創(chuàng)建表時我?guī)缀鯖]有困惑?,F在我正在電子商務中創(chuàng)建多種產品,例如 flikart。對于服裝,我需要不同的規(guī)格(顏色,尺寸),對于移動設備,我需要不同的規(guī)格(內存,存儲),并且每種產品都有不同的規(guī)格。如果我在前端查看頁面(如果我選擇移動設備意味著它應該只顯示基于手機的規(guī)范)。如何為此目的創(chuàng)建表。
查看完整描述

1 回答

?
眼眸繁星

TA貢獻1873條經驗 獲得超9個贊

您需要研究EAV實體屬性值的概念。


你的桌子可能是:


categories (id, title, parent_id, status) ; here parent_id is to handle child categories

products (id, title, description, price, status, quantity)

attributes (id, title, status) ; attribute can have colors, sizes

attributevalues (id, attribute_id, value, status) ; it contains colors's attribute_id and values can be green, red, yellow etc

attributes_products (id, product_id, attribute_id, attributevalue_id, price, sign) ; it will be attaching attribute title with options to a product also how much price add or minus in case of products attributes

如有疑問,請多問


查看完整回答
反對 回復 2022-07-16
  • 1 回答
  • 0 關注
  • 113 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號