WHERE album_id=$album_id GROUP BY photo_id ORDER BY photo_order LIMIT $rowstart,".$settings['thumbs_per_page']
);
WHERE album_id=$album_id GROUP BY photo_id ORDER BY photo_order ASC/DESC LIMIT $rowstart,".$settings['thumbs_per_page']
);