db.commit()
no change at all .you can try it by yourself.
>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+un...@googlegroups.com. >For more options, visit this group at http://groups.google.com/group/web2py?hl=en. > >
Massimo
On Dec 27, 8:15 pm, 王怀玉 <why00...@163.com> wrote:
> i had done as your advice.
>
> no change at all .
> you can try it by yourself.
>
> thank you very very much !
>
######## 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 ###############