特牛网址导航

Python MySQL - mysql-connector 连续查询select无效的问题-CSDN博客

网友收藏
文章浏览阅读468次。我在循环查询 类似下面,发现不能正常执行,只有第一次才能查询到,数据库更新数据后数据不能被select查询到。import mysql.connectorimport timemydb = mysql.connector.connect( host="localhost", user="root", passwd="123456", database="runoob_db")while True: mycursor = mydb.cursor() mycursor.exe