public function order($query)
    {
        $clause = '';

        if (!empty($query->order)) {
            $clause = 'ORDER BY ';
            $list = array();
            foreach ($query->order as $order) {
                $columns = AnDomainQueryHelper::parseColumns($query, $order['column']);
                foreach ($columns as $column) {
                    $list[] = $column.' '.$order['direction'];
                }
            }

            $clause .= implode(' , ', $list);
        }

        return $clause;
    }
public function order($query)
    {
        $clause = '';

        if (!empty($query->order)) {
            $clause = 'ORDER BY ';
            $list = array();
            foreach ($query->order as $order) {
                $columns = AnDomainQueryHelper::parseColumns($query, $order['column']);
                foreach ($columns as $column) {
                    $list[] = $column.' '.$order['direction'];
                }
            }

            $clause .= implode(' , ', $list);
        }

        return $clause;
    }
public function order ( $ query ) { $ clause = '' ; if ( ! empty ( $ query -> order ) ) { $ clause = 'ORDER BY ' ; $ list = array ( ) ; foreach ( $ query -> order as $ order ) { $ columns = AnDomainQueryHelper :: parseColumns ( $ query , $ order [ 'column' ] ) ; foreach ( $ columns as $ column ) { $ list [ ] = $ column . ' ' . $ order [ 'direction' ] ; } } $ clause .= implode ( ' , ' , $ list ) ; } return $ clause ; }
Return the order clause.

@return string
Return the order clause .