If I understand the problem, you need to do db.commit()
On Dec 27, 3:45 am, 王怀玉 <why00...@163.com> wrote: > to reuse model definition in a module, so i use gluon.shell.env . > code in module is like this: > ######## module code start ############### > os.chdir(/path/to/web2py/) > from gluon.shell import env > globals().update(env('my_application_name', import_models=True)) > while True: > print "count", db(db.mytable.id>0).count() > ### no change at all when i insert a row into db.mytable > time.sleep(5) > ######## module code end ############### > then, execute the module. the problem is that when a row is inserted into > db.mytable, the result printed by module doesn't change at all. > > how can i solve this ? thank you very much ! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@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.