Retrieve sorted cards from db