public function getQuery() {
        $query = 'SELECT '.implode(', ', $this->fields)
                .' FROM '.implode(', ', $this->from);
        if (count($this->conditions) > 0) {
            $query = $query.' WHERE '.implode(' AND ', $this->conditions);
        }
        $query = rtrim($query).';';

        return $query;
    }
public function getQuery() {
        $query = 'SELECT '.implode(', ', $this->fields)
                .' FROM '.implode(', ', $this->from);
        if (count($this->conditions) > 0) {
            $query = $query.' WHERE '.implode(' AND ', $this->conditions);
        }
        $query = rtrim($query).';';

        return $query;
    }
public function getQuery ( ) { $ query = 'SELECT ' . implode ( ', ' , $ this -> fields ) . ' FROM ' . implode ( ', ' , $ this -> from ) ; if ( count ( $ this -> conditions ) > 0 ) { $ query = $ query . ' WHERE ' . implode ( ' AND ' , $ this -> conditions ) ; } $ query = rtrim ( $ query ) . ';' ; return $ query ; }
Build query to generate a string

@return string
Build query to generate a string