public function update($compare, $keys, $values, $limit = 1, $begin = 0)
    {
        $sk = $this->keys;
        if (is_array($keys)) {
            foreach ($sk as &$value) {
                if (!isset($keys[$value])) {
                    break;
                }

                $value = $keys[$value];
            }
            array_slice($sk, 0, count($keys));
        } else {
            $sk = array($keys);
        }


        $sv = $this->fields;
        foreach ($sv as &$value) {
            if (!isset($values[$value])) {
                break;
            }

            $value = $values[$value];
        }
        array_slice($sv, 0, count($values));
        $this->io->update($this->indexId, $compare, $sk, $sv, $limit, $begin);
        $ret = $this->io->registerCallback(array($this, 'updateCallback'));
        if ($ret instanceof ErrorMessage) {
            throw $ret;
        }

        return $ret;
    }
public function update($compare, $keys, $values, $limit = 1, $begin = 0)
    {
        $sk = $this->keys;
        if (is_array($keys)) {
            foreach ($sk as &$value) {
                if (!isset($keys[$value])) {
                    break;
                }

                $value = $keys[$value];
            }
            array_slice($sk, 0, count($keys));
        } else {
            $sk = array($keys);
        }


        $sv = $this->fields;
        foreach ($sv as &$value) {
            if (!isset($values[$value])) {
                break;
            }

            $value = $values[$value];
        }
        array_slice($sv, 0, count($values));
        $this->io->update($this->indexId, $compare, $sk, $sv, $limit, $begin);
        $ret = $this->io->registerCallback(array($this, 'updateCallback'));
        if ($ret instanceof ErrorMessage) {
            throw $ret;
        }

        return $ret;
    }
public function update ( $ compare , $ keys , $ values , $ limit = 1 , $ begin = 0 ) { $ sk = $ this -> keys ; if ( is_array ( $ keys ) ) { foreach ( $ sk as & $ value ) { if ( ! isset ( $ keys [ $ value ] ) ) { break ; } $ value = $ keys [ $ value ] ; } array_slice ( $ sk , 0 , count ( $ keys ) ) ; } else { $ sk = array ( $ keys ) ; } $ sv = $ this -> fields ; foreach ( $ sv as & $ value ) { if ( ! isset ( $ values [ $ value ] ) ) { break ; } $ value = $ values [ $ value ] ; } array_slice ( $ sv , 0 , count ( $ values ) ) ; $ this -> io -> update ( $ this -> indexId , $ compare , $ sk , $ sv , $ limit , $ begin ) ; $ ret = $ this -> io -> registerCallback ( array ( $ this , 'updateCallback' ) ) ; if ( $ ret instanceof ErrorMessage ) { throw $ ret ; } return $ ret ; }
Modify rows altering their values

@param string  $compare
@param array   $keys
@param array   $values
@param integer $limit
@param integer $begin

@throws ErrorMessage

@return integer
Modify rows altering their values