Display dynamic data based on category
I am trying to display data based on category, I have this code in MySQL
SELECT Vendors.VendorID, VendorsCategories.VendCatID, Vendors.Company, Vendors.Contact, Vendors.Phone, Vendors.Website, VendorsCategories.CatName
FROM Vendors LEFT JOIN VendorsCategories ON Vendors.intCatID = VendorsCategories.VendCatID
ORDER BY VendorsCategories.CatName , Vendors.Company ASC
I want to have a result like the following example
Category #1
vendor 1
vendor 2
vendor 3
Category #2
vendor 1
vendor 2
and so on...
I want to display the Category name once for all items in that category.
I hope someone can help me with this
Thanks in advanced