Why can't we invent a "move" command :)
2009/1/31 mdipierro <[email protected]> > > 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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

