文、意如
建立:會員資料表、產品資料表、訂單資料表、付款方式
會員資料表
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718715899.png.png)
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718285134.png.png)
產品資料表
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718285264.png.png)
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718285183.png.png)
訂單資料表
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718715843.png.png)
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718715190.png.png)
付款方式
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718715962.png.png)
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718715941.png.png)
結合
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
![](https://dotblogsfile.blob.core.windows.net/user/意如-yiru/66c6b8e3-c9a0-4904-b319-c0eef23786f7/1718715049.png.png)
Yiru@Studio - 關於我 - 意如