[eluser]seanloving[/eluser]
[quote author="pete01" date="1264188945"]Try this:
Code:
SELECT
inv.product_id,
COUNT(*) AS product_quantity,
prd.part_number,
prd.description,
FROM inventory AS inv
JOIN products AS prd
ON prd.product_id = inv.product_id
GROUP BY inv.product_id
[/quote]
Thanks pete01 for the fast reply. This looks about like what I have, but without the foreach - perfect (hopefully). I'll try it and let you know how it works. --Sean Loving