forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: epsilon on October 23, 2003, 12:08:40 am

Title: Auto arrange the categories by name
Post by: epsilon on October 23, 2003, 12:08:40 am
It will be cool that the categories will be arrange by name automatically because i have 40 categories and when i want create a new category i must up it 40 times, its too boring...
Title: Auto arrange the categories by name
Post by: DJMaze on October 23, 2003, 02:38:06 am
in index.php change
Code: [Select]
$result = db_query("SELECT cid, catname, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY pos");
into
Code: [Select]
$result = db_query("SELECT cid, catname, description FROM {$CONFIG['TABLE_CATEGORIES']} WHERE parent = '$parent'  ORDER BY pos, name");

didn't test this. but it should work
Title: No it doesent go...
Post by: epsilon on October 23, 2003, 08:27:20 pm
When i create the new category (for example Amber) i the last, no the first by name.
Title: Auto arrange the categories by name
Post by: DJMaze on October 27, 2003, 09:55:53 pm
oops it must be

ORDER BY pos AND name