protected function _buildQueryOrder(Library\DatabaseQuerySelect $query) { if ($this->sort == 'table') { $direction = strtoupper($this->direction); $query->order('tbl.table', $direction); $query->order('tbl.row', $direction); $query->order('tbl.original', 'DESC'); } }
protected function _buildQueryOrder(Library\DatabaseQuerySelect $query) { $state = $this->getState(); $direction = strtoupper($state->direction); if ($state->sort == 'ordering') { $query->order('category_title', 'ASC')->order('ordering', $direction); } else { $query->order($state->sort, $direction)->order('category_title', 'ASC')->order('ordering', 'ASC'); } }
protected function _buildQueryOrder(Library\DatabaseQuerySelect $query) { if ($this->getState()->distinct && !empty($this->getState()->column)) { $query->order('package', 'asc'); } else { parent::_buildQueryOrder($query); } }
protected function _buildQueryOrder(Library\DatabaseQuerySelect $query) { $sort = $this->getState()->sort; $direction = strtoupper($this->getState()->direction); if ($sort) { $column = $this->getTable()->mapColumns($sort); if (array_key_exists($column, $this->getTable()->getColumns())) { $query->order($column, $direction); } } }
protected function _buildQueryOrder(Library\DatabaseQuerySelect $query) { $state = $this->getState(); $direction = strtoupper($state->direction); $query->order('section.title', $direction)->order('tbl.title', $direction); }
protected function _buildQueryOrder(Library\DatabaseQuerySelect $query) { $query->order('tbl.revision', 'desc'); }