Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Sorted items for a Template Globals

Quote Reply
Sorted items for a Template Globals
I am using following to define template globals for loading data from Category table.

sub {
return { cats => $DB->table('Category')->select()->fetchall_hashref };
}

This works fine but the globals' items are in the order they were entered in the table.

The Category table has 2 fields -
CatID, Description


What change I need to make to get the Globals' items in Ascending order based on the Description field.

I would apprecaite any help.

Thanks.