Code:
select o.delivery_name, o.delivery_company, o.delivery_street_address, o.delivery_suburb, o.delivery_city, o.delivery_postcode, o.delivery_state, o.delivery_country
from orders o JOIN orders_products op USING(orders_id) JOIN products p USING(products_id) JOIN manufacturers m USING(manufacturers_id)
where m.manufacturers_id = id_of_your_manufacturer
Or, if You want select manufacturer by its name:
Code:
select o.delivery_name, o.delivery_company, o.delivery_street_address, o.delivery_suburb, o.delivery_city, o.delivery_postcode, o.delivery_state, o.delivery_country
from orders o JOIN orders_products op USING(orders_id) JOIN products p USING(products_id) JOIN manufacturers m USING(manufacturers_id)
where m.manufacturers_name like 'name_of_manufacturer'
Bookmarks