classes/Connection.php
public function update($table, array $data = null, $where = null)
    {
        $update = $this->build()->update($table);
        if ($data) {
            $update->set($data);
        }
        if ($where) {
            $update->where($where);
        }
        if ($data && $where) {
            return $update->execute();
        }

        return $update;
    }
public function update($table, array $data = null, $where = null)
    {
        $update = $this->build()->update($table);
        if ($data) {
            $update->set($data);
        }
        if ($where) {
            $update->where($where);
        }
        if ($data && $where) {
            return $update->execute();
        }

        return $update;
    }
public function update ( $ table , array $ data = null , $ where = null ) { $ update = $ this -> build ( ) -> update ( $ table ) ; if ( $ data ) { $ update -> set ( $ data ) ; } if ( $ where ) { $ update -> where ( $ where ) ; } if ( $ data && $ where ) { return $ update -> execute ( ) ; } return $ update ; }
Update data in a table

When all parameters are specified, the update query is immediately
executed and the number of rows affected will be returned. Otherwise
the query builder is returned so you can extend the query further.

@param string       $table
@param array        $data  (optional)
@param array|string $where (optional)
@return Query|int
@throws QueryException
Update data in a table