SQL SELECT Join?
Posted
by SurfingCat
on Stack Overflow
See other posts from Stack Overflow
or by SurfingCat
Published on 2010-03-15T12:31:00Z
Indexed on
2010/03/15
12:39 UTC
Read the original article
Hit count: 258
Hello, i got a MySql DB. There is a table with products and orders. Structure: Products: product_id, name, manufacturers_id Orders: orders_id, product_id, quantitiy
Now I want to get all orders (show only products where product id=1). I tried:
SELECT
orders.orders_id,
orders.product_od
FROM products, orders
WHERE products.manufacturers_id = 1
GROUP BY orders_id
ORDER BY orders_id
But this doesnt work
© Stack Overflow or respective owner