我已经写了蟒蛇守护进程读取数据库......我做了下:MySQLdb的蟒蛇问题刷新数据库
db.connect('localhost', user, pass, database)
while true:
cursor = db.cursor()
sql = "SELECT id FROM task WHERE status='pending'"
r = cursor.execute(sql)
if r != 0:
result = cursor.fetchall()
#.....
的问题是:当改变数据库,后台程序检测不到它...可以刷新... 我能做什么?
谢谢!!
正在改变运行期间的数据库? – 2011-03-24 19:05:41
是的,我插入新的任务,但它没有检测到他们 – igferne 2011-03-24 19:22:50