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.
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.