文、意如
建立:會員資料表、產品資料表、訂單資料表、付款方式
會員資料表


產品資料表


訂單資料表


付款方式


結合
SELECT orders.or_num,product_db.pro_product_name,product_db.pro_price,member.mr_name,member.mr_phone,def_paymethod.note
FROM orders
INNER JOIN product_db ON orders.pro_pk=product_db.pro_pk
INNER JOIN member ON orders.mr_pk=member.mr_pk
INNER JOIN def_paymethod ON orders.pay_mod=def_paymethod.item
WHERE
orders.or_delete=0
AND
member.mr_delete=0
AND
product_db.pro_del=0

Yiru@Studio - 關於我 - 意如