define: def cleanup(record,fields): return dict([(k,v) for k,v in record.items() if k in fields and not k=='id'])
then copy it db.b.insert(**cleanup(db(db.a.id==id).select()[0],db.b.fields)) then delete the old one db(db.a.id==id).delete() On Jan 31, 4:30 pm, BearXu <bearx...@gmail.com> wrote: > Now I want to move a record from A table to B table > do we have an easier way? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---