private function getUpdateQuery()
    {
        if (isset($this->parts['from'][0]['alias'])) {
            $fromClause = $this->parts['from'][0]['alias'].' FROM '.$this->getFromClause();
        } else {
            $fromClause = $this->parts['from'][0]['table'];
        }

        $setClause = array();

        foreach ($this->parts['set'] as $idenfier => $value) {
            $setClause[] = $this->getExpressionBuilder()->equal($idenfier, $value);
        }

        return 'UPDATE '.$fromClause.
               ' SET '.implode(', ', $setClause).
               (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null);
    }
private function getUpdateQuery()
    {
        if (isset($this->parts['from'][0]['alias'])) {
            $fromClause = $this->parts['from'][0]['alias'].' FROM '.$this->getFromClause();
        } else {
            $fromClause = $this->parts['from'][0]['table'];
        }

        $setClause = array();

        foreach ($this->parts['set'] as $idenfier => $value) {
            $setClause[] = $this->getExpressionBuilder()->equal($idenfier, $value);
        }

        return 'UPDATE '.$fromClause.
               ' SET '.implode(', ', $setClause).
               (($this->parts['where'] !== null) ? ' WHERE '.$this->parts['where'] : null);
    }
private function getUpdateQuery ( ) { if ( isset ( $ this -> parts [ 'from' ] [ 0 ] [ 'alias' ] ) ) { $ fromClause = $ this -> parts [ 'from' ] [ 0 ] [ 'alias' ] . ' FROM ' . $ this -> getFromClause ( ) ; } else { $ fromClause = $ this -> parts [ 'from' ] [ 0 ] [ 'table' ] ; } $ setClause = array ( ) ; foreach ( $ this -> parts [ 'set' ] as $ idenfier => $ value ) { $ setClause [ ] = $ this -> getExpressionBuilder ( ) -> equal ( $ idenfier , $ value ) ; } return 'UPDATE ' . $ fromClause . ' SET ' . implode ( ', ' , $ setClause ) . ( ( $ this -> parts [ 'where' ] !== null ) ? ' WHERE ' . $ this -> parts [ 'where' ] : null ) ; }
Generates an "UPDATE" query.

@return string The "UPDATE" query.
Generates an UPDATE query .