What you say makes sense in cases where the databse is being modified
(update/insert/delete, etc). But in this case, the query in the loop
of side1() does not change the database state, it's simply looking for
a change in the database, so I wouldn't think it would require a
db.commit.
On Aug 14, 2
This is required because you are using the DAL outside web2py
framework,
"""
from gluon import *
import time
db = DAL('mysql://web2py:web2p ...
"""
When used like above, you have to call db.commit to complete the
transaction.
Normally all database insert/updates/deletes are committed at the end
Hello again,
It seems that db.commit() is necessary to get the query to reflect the
changed state of the database for some reason.
The simple code at the end of this message illustrates the problem.
Starting two ipython sessions, and running side1() in one, and then
side2() in the other, if the db
3 matches
Mail list logo