Sorting category and image lists
database