coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: suprsonika on March 31, 2005, 05:32:47 AM

Title: changing the order of pics when editing them
Post by: suprsonika on March 31, 2005, 05:32:47 AM
I'm trying to order the photos by date when editing them. I found this in the FAQs:

By default, the pics are shown alphabetically when you edit them. To change the sorting order to "by date", edit editpics.php and change
$result = db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '$album_id' ORDER BY filename LIMIT $start, $count");
to
$result = db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '$album_id' ORDER BY pid LIMIT $start, $count");


That works, but it puts the older ones first, and I want the newest ones to be listed first. Anyone know how to change it?

Sarah

Title: Re: changing the order of pics when editing them
Post by: Nibbler on March 31, 2005, 10:14:56 AM
make it ORDER BY pid DESC
Title: Re: changing the order of pics when editing them
Post by: suprsonika on April 01, 2005, 09:49:09 AM
Thanks, it worked. You rock!

Sarah