public function update($table, $columns) 
    {
        $this->sql = 'UPDATE ' . $this->quoteTableName($table) . ' SET ';
        foreach($columns as $k => $v) {
            $this->sql .= $this->quoteColumnName($k) .' = '. $this->quoteValue($v) . ', ';
        }
        
        $this->sql = trim($this->sql, ', ');
        
        return $this;
    }
public function update($table, $columns) 
    {
        $this->sql = 'UPDATE ' . $this->quoteTableName($table) . ' SET ';
        foreach($columns as $k => $v) {
            $this->sql .= $this->quoteColumnName($k) .' = '. $this->quoteValue($v) . ', ';
        }
        
        $this->sql = trim($this->sql, ', ');
        
        return $this;
    }
public function update ( $ table , $ columns ) { $ this -> sql = 'UPDATE ' . $ this -> quoteTableName ( $ table ) . ' SET ' ; foreach ( $ columns as $ k => $ v ) { $ this -> sql .= $ this -> quoteColumnName ( $ k ) . ' = ' . $ this -> quoteValue ( $ v ) . ', ' ; } $ this -> sql = trim ( $ this -> sql , ', ' ) ; return $ this ; }
Generate an update statement.

@param string $table is the table name
@param array $columns are the columns name associated with the value to be updated

@return object $this
Generate an update statement .