thehenrys.net

May 14, 2007

mySQL left join on more than one table? yes!

Filed under: Programming — dh @ 11:04 am

I never knew you could do this till the other day… Man that makes it easy!

SELECT products.product_ID, manufacturer.manufacturer_name, category.category_name
FROM products
left join manufacturer ON products.manufacturer_ID = manufacturer.manufacturer_ID
left join category ON products.category_ID = category.category_ID
ORDER BY products.product_ID

Leave a Reply