Thread: SQL sorting
View Single Post
Old 31-05-2007, 06:06   #4 (permalink)
LazyMoon
Registered
 
LazyMoon's Avatar
 
Join Date: Sep 2006
Location: Adelaide, Australia
Posts: 12
I'm not too sure what you actually want from your SQL. What do you mean by "what I need is to have groups.name and items.name combined and sorted alphabetically"?

Can you give us an example of what you want.

If your trying to sort multiple columns you can try:

Code:
SELECT `items`.`id`,`items`.`name` FROM `items` LEFT JOIN `groups` ON `items`.`group_id`=`groups`.`id` ORDER BY `items`.`group_id` ASC, `items`.`name` ASC LIMIT 10,10
  Reply With Quote