order by id for some database calls