Added db function: GetLatestImages(id, n)