def changelastn():
#
# Given a model named mod2 , and a table named tbusers,
# that has fields called firstn and lastn ,
# here's how you can update the field named lastn so it
# will contain the name Brown
#
# Sterling Hankins 05/23/2008
#
mod2(mod2.tbusers.firstn=='Susan').update(lastn='Brown')
response.flash = 'Changed the field named lastn to Brown'
return dict()
or
def changelastn():
rows=mod2(mod2.tbusers.firstn=='Susan').select()
for row in rows: row.update_record(lastn='Brown')
response.flash = 'Changed the field named lastn to Brown'
return dict()