Fygo Fygo - 1 month ago 16
MySQL Question

Piwigo - sort albums on site by order set in Piwigo's admin

I have to edit a site that has already set up various things and I got stuck with Piwigo which is used for the galleries. In Piwigo's admin I can set the order for the galleries but I don't know how to sort them on the site, they always appear in wrong order. Does anybody know the field name by which I should sort? I don't have any access to the databases of this site and I am pretty lost.

This is the sql I have to select the thumbs for the galleries:

"SELECT cat.id, cat.name, cat.representative_picture_id, img.path FROM piwigo_categories AS cat, piwigo_images AS img WHERE cat.representative_picture_id = img.id"


Any help greatly appreciated!

Answer

So cat.rank seems to do the trick.