SELECT * FROM user_order as c
LEFT JOIN product_order AS b ON c.order_id = b.order_id
LEFT JOIN product AS a ON a.prod_id = b.prod_id
WHERE c.id = "16"
too expensive
my user_order list has name, id
my product_order also has id
my product also has name
I all have prod_id bits
is there no way for me to show some data now?
for example, I just want to show the name, of product, not the name. of user_order
. How did this happen? How can it be improved?
update
id = user_id
my user_order has order_id, id, name.
my product_order has order_id, prod_id, id
my product has prod_id, name, icon
what I mainly want to show is user_order, but show the trade name of product
I will send the goods to product_order with purchased goods
, that is, it will be like this
product_order:
so I know which prod_id (merchandise)
list 9 has prod_id
but I want to show his merchandise in user_order
that is, order_id 8 merchandise has 1pime3 prod_id 4
I want to show name, icon