🌍
English
[Bugtracker] ticket 2809 is not implemented yet but a user needed to reverse sort by album date and I made a quick order in the database. I publish it here because it might be interesting for other people as well.
create table tmp_album_order (id int, rank int); insert into tmp_album_order ( select id, @row := @row + 1 as row from piwigo_categories, (SELECT @row := 0) r where id_uppercat is null order by id desc ); update piwigo_categories t1, tmp_album_order t2 set t1.rank=t2.rank where t1.id=t2.id ; drop table tmp_album_order;
I consider the album date as equivalent to the album id. the trick is the "@row := @row + 1 as row" which acts as a sequence.
Ordering in the same order as id would have been much simpler, of course.
Offline