Ще трябва да JOIN
таблиците, както следва:
SELECT products.description, orders.quantity, orders.price
FROM detail_orders
INNER JOIN products ON (products.prod_id = detail_orders.prod_id)
INNER JOIN orders ON (orders.id = detail_orders.or_id)
Ако искате да направите заявка за конкретен потребител:
SELECT products.description, orders.quantity, orders.price
FROM detail_orders
INNER JOIN products ON (products.prod_id = detail_orders.prod_id)
INNER JOIN orders ON (orders.id = detail_orders.or_id)
WHERE orders.iduser = someUser