src/LitePdo.php
public function update(string $from, $wheres, array $values, array $options = [])
    {
        list($where, $bindings) = DBHelper::handleConditions($wheres, $this);

        $options['update'] = $this->qn($from);
        $options['where'] = $where;

        $statement = $this->compileUpdate($values, $bindings, $options);

        if (isset($options['returnSql'])) {
            return [$statement, $bindings];
        }

        return $this->fetchAffected($statement, $bindings);
    }
public function update(string $from, $wheres, array $values, array $options = [])
    {
        list($where, $bindings) = DBHelper::handleConditions($wheres, $this);

        $options['update'] = $this->qn($from);
        $options['where'] = $where;

        $statement = $this->compileUpdate($values, $bindings, $options);

        if (isset($options['returnSql'])) {
            return [$statement, $bindings];
        }

        return $this->fetchAffected($statement, $bindings);
    }
public function update ( string $ from , $ wheres , array $ values , array $ options = [ ] ) { list ( $ where , $ bindings ) = DBHelper :: handleConditions ( $ wheres , $ this ) ; $ options [ 'update' ] = $ this -> qn ( $ from ) ; $ options [ 'where' ] = $ where ; $ statement = $ this -> compileUpdate ( $ values , $ bindings , $ options ) ; if ( isset ( $ options [ 'returnSql' ] ) ) { return [ $ statement , $ bindings ] ; } return $ this -> fetchAffected ( $ statement , $ bindings ) ; }
Run a update statement
@param  string $from
@param  array|string $wheres
@param  array $values
@param array $options
@return int|array
@throws \InvalidArgumentException
Run a update statement