If you just want to display the number of products (not the details) a join 
would do it.  Something like


    SELECT c.ID, c.CATEGORY, c.RANK, c.CATEGORY AS ID_Field, COUNT(p.ID) AS 
TotalProducts
    FROM   Categories c LEFT JOIN Products p ON p.Category = c.Category
    GROUP BY c.ID, c.CATEGORY, c.RANK, c.CATEGORY
    

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349227
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to