require 'sqlite3'

db = SQLite3::Database.new()


db.execute('create temp table players (name, score, active, jerseyNum)')
db.execute('insert into players values (,0,,99)')
db.execute('insert into players values (,0,,100)')
db.execute('insert into players values (,0,,101)')




db.execute('update players set name=?, score=?, active=? where jerseyNum=?', 'Smith, Steve', 42, true, 99)


db.execute('update players set name=:name, score=:score, active=:active where jerseyNum=:num',
    :num => 100,
    :name => 'John Doe',
    :active => false,
    :score => -1
)


stmt = db.prepare('update players set name=?4, score=?3, active=?2 where jerseyNum=?1')
stmt.bind_param(1, 101)
stmt.bind_param(2, true)
stmt.bind_param(3, 3)
stmt.bind_param(4, )
stmt.execute


db.execute2('select * from players') {|row| p row}