src/Charcoal/Source/DatabaseSource.php
public function sqlOrders()
    {
        if (!$this->hasOrders()) {
            return '';
        }

        $parts = [];
        foreach ($this->orders() as $order) {
            if (!$order instanceof DatabaseOrder) {
                $order = $this->createOrder($order->data());
            }

            $sql = $order->sql();
            if (strlen($sql) > 0) {
                $parts[] = $sql;
            }
        }

        if (empty($parts)) {
            return '';
        }

        return ' ORDER BY '.implode(', ', $parts);
    }
public function sqlOrders()
    {
        if (!$this->hasOrders()) {
            return '';
        }

        $parts = [];
        foreach ($this->orders() as $order) {
            if (!$order instanceof DatabaseOrder) {
                $order = $this->createOrder($order->data());
            }

            $sql = $order->sql();
            if (strlen($sql) > 0) {
                $parts[] = $sql;
            }
        }

        if (empty($parts)) {
            return '';
        }

        return ' ORDER BY '.implode(', ', $parts);
    }
public function sqlOrders ( ) { if ( ! $ this -> hasOrders ( ) ) { return '' ; } $ parts = [ ] ; foreach ( $ this -> orders ( ) as $ order ) { if ( ! $ order instanceof DatabaseOrder ) { $ order = $ this -> createOrder ( $ order -> data ( ) ) ; } $ sql = $ order -> sql ( ) ; if ( strlen ( $ sql ) > 0 ) { $ parts [ ] = $ sql ; } } if ( empty ( $ parts ) ) { return '' ; } return ' ORDER BY ' . implode ( ', ' , $ parts ) ; }
Compile the ORDER BY clause.

@return string
Compile the ORDER BY clause .