Budete se muset JOIN
tabulky, jako je tato:
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)
Pokud se chcete zeptat na konkrétního uživatele:
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