<?php $query = $this->db ->select('id, page_title') ->where('nav_id', 12) ->order_by('some_field', 'DESC') ->limit(5) ->get('pages'); ?>