Hi all, I am trying to get a bunch of results, group them by category, and then order each group of categories. My query is thus:
SELECT l.CatalogNumber, l.MP3Name, l.PDFLink, l.PDFName, l.Title, p.PublisherName, c.ComposerLname, a.ArrangerLname, l.Price, l.Description, o.Alias FROM listings l, publishers p, composers c, arrangers a, categories o WHERE (a.ArrangerLname like '%$Criteria%' or p.PublisherName like '%$Criteria%' or c.ComposerLname like '%$Criteria%' or l.Title like '%$Criteria%' or l.CatalogNumber like '%$Criteria%' or l.Price like '%$Criteria%' or l.Description like '%$Criteria%') AND l.PublisherID=p.PublisherID and l.ComposerID=c.ComposerID and l.ArrangerID=a.ArrangerID and l.CategoryID=o.CategoryID GROUP BY o.Alias ASC ORDER BY o.Alias, c.ComposerLname ASC; This only displays 1 row in each category, so clearly I have an error in my Group By and/or Order By clause(s). I am sure my error is fairly basic, but I don't have enough experience with MySQL to figure it out. Does anyone have any insight into the problem? -Erich- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]