public function update($set = array())
    {
        if (is_array($set)) {
            $params = array();
            foreach ($set as $field => $param) {
                $this->add('set', $field . ' = ?', true);
                $params[] = $param;
            }
            $this->params = array_merge($params, $this->params);
        } else {
            $this->add('set', $set, true);
        }
        $this->type = self::UPDATE;
        return $this->execute();
    }
public function update($set = array())
    {
        if (is_array($set)) {
            $params = array();
            foreach ($set as $field => $param) {
                $this->add('set', $field . ' = ?', true);
                $params[] = $param;
            }
            $this->params = array_merge($params, $this->params);
        } else {
            $this->add('set', $set, true);
        }
        $this->type = self::UPDATE;
        return $this->execute();
    }
public function update ( $ set = array ( ) ) { if ( is_array ( $ set ) ) { $ params = array ( ) ; foreach ( $ set as $ field => $ param ) { $ this -> add ( 'set' , $ field . ' = ?' , true ) ; $ params [ ] = $ param ; } $ this -> params = array_merge ( $ params , $ this -> params ) ; } else { $ this -> add ( 'set' , $ set , true ) ; } $ this -> type = self :: UPDATE ; return $ this -> execute ( ) ; }
Execute a update query with specified data

@param array|string $set
@return int
Execute a update query with specified data