Hello, 
i am trying to update a row on a db table, but it is not updating, what is 
the problem ?

my db table definition:
db.define_table('contest', Field('name', length=128 ), 
Field('contest_host', length=128,), Field('duration', 'time' ), 
Field('time_passed','time', default = 0), Field('rank_frozen','time', 
default = 0), Field('running',length= 10, readable=False, default = "no"), 
Field('lang'))

My update function:

def flip_contest_status():
    id = request.post_vars.id
    row = db(db.contest.id == id ).select().first()
    value = "no"
    con =  row.running
    if con is "no":
        value = "yes"
    db(db.contest.id == id ).select().first().update(running = value)
    session.flash = row.name + " mode changed to "+ value
    return locals()

it doesn't update my db row !! 

What to do ?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to