private function getSelectQuery()
    {
        return 'SELECT '.(empty($this->parts['select']) ? '*' : implode(', ', $this->parts['select'])).
               ' FROM '.$this->getFromClause().
               (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null).
               (!empty($this->parts['group_by']) ? ' GROUP BY '.implode(', ', $this->parts['group_by']) : null).
               (($this->parts['having'] !== null) ? ' HAVING '.$this->parts['having'] : null).
               (!empty($this->parts['order_by']) ? ' ORDER BY '.implode(', ', $this->parts['order_by']) : null).
               (($this->parts['limit'] !== null) ? ' LIMIT '.$this->parts['limit'] : null).
               (($this->parts['offset'] !== null) ? ' OFFSET '.$this->parts['offset'] : null);
    }
private function getSelectQuery()
    {
        return 'SELECT '.(empty($this->parts['select']) ? '*' : implode(', ', $this->parts['select'])).
               ' FROM '.$this->getFromClause().
               (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null).
               (!empty($this->parts['group_by']) ? ' GROUP BY '.implode(', ', $this->parts['group_by']) : null).
               (($this->parts['having'] !== null) ? ' HAVING '.$this->parts['having'] : null).
               (!empty($this->parts['order_by']) ? ' ORDER BY '.implode(', ', $this->parts['order_by']) : null).
               (($this->parts['limit'] !== null) ? ' LIMIT '.$this->parts['limit'] : null).
               (($this->parts['offset'] !== null) ? ' OFFSET '.$this->parts['offset'] : null);
    }
private function getSelectQuery ( ) { return 'SELECT ' . ( empty ( $ this -> parts [ 'select' ] ) ? '*' : implode ( ', ' , $ this -> parts [ 'select' ] ) ) . ' FROM ' . $ this -> getFromClause ( ) . ( ( $ this -> parts [ 'where' ] !== null ) ? ' WHERE ' . $ this -> parts [ 'where' ] : null ) . ( ! empty ( $ this -> parts [ 'group_by' ] ) ? ' GROUP BY ' . implode ( ', ' , $ this -> parts [ 'group_by' ] ) : null ) . ( ( $ this -> parts [ 'having' ] !== null ) ? ' HAVING ' . $ this -> parts [ 'having' ] : null ) . ( ! empty ( $ this -> parts [ 'order_by' ] ) ? ' ORDER BY ' . implode ( ', ' , $ this -> parts [ 'order_by' ] ) : null ) . ( ( $ this -> parts [ 'limit' ] !== null ) ? ' LIMIT ' . $ this -> parts [ 'limit' ] : null ) . ( ( $ this -> parts [ 'offset' ] !== null ) ? ' OFFSET ' . $ this -> parts [ 'offset' ] : null ) ; }
Generates a "SELECT" query

@return string The "SELECT" query.
Generates a SELECT query