protected function getOrder(array $queryParts)
    {
        if (isset($queryParts['order'])) {
            $order = [];

            foreach ($queryParts['order'] as $array) {
                $order[] =
                    $this->quoteIdentifier($array[0]) .
                    (strtolower($array[1]) === 'asc' ? ' ASC' : ' DESC');
            }

            return 'ORDER BY ' . implode(', ', $order);
        }

        return null;
    }
protected function getOrder(array $queryParts)
    {
        if (isset($queryParts['order'])) {
            $order = [];

            foreach ($queryParts['order'] as $array) {
                $order[] =
                    $this->quoteIdentifier($array[0]) .
                    (strtolower($array[1]) === 'asc' ? ' ASC' : ' DESC');
            }

            return 'ORDER BY ' . implode(', ', $order);
        }

        return null;
    }
protected function getOrder ( array $ queryParts ) { if ( isset ( $ queryParts [ 'order' ] ) ) { $ order = [ ] ; foreach ( $ queryParts [ 'order' ] as $ array ) { $ order [ ] = $ this -> quoteIdentifier ( $ array [ 0 ] ) . ( strtolower ( $ array [ 1 ] ) === 'asc' ? ' ASC' : ' DESC' ) ; } return 'ORDER BY ' . implode ( ', ' , $ order ) ; } return null ; }
Prepare the order for use in the MySQL query.
@param  array $queryParts
@return null|string
Prepare the order for use in the MySQL query .