Photos for gallery is ordered via find_by_sql