Rewrited the queries in DB.ListPhoto with rawQuery

And I've also added the ordering of the photos.