我正在使用python-mysql db api將一些值插入表名在python變量中的表中。所以我寫了下面的代碼 DB_CURSOR.execute("""INSERT INTO %s (name,created_by,state,description,docs,admin_email,date_created) VALUES(%s,%s,%s,%s,%s,%s,%s)""", (hosts_t
嘿傢伙, 我有以下問題: 1進程執行一個非常大的查詢並將結果寫入文件中,進程應該將狀態更新到數據庫。 第一thaught:沒問題,僞代碼: db = mysqldb.connect()
cursor = db.cursor()
large = cursor.execute(SELECT * FROM VERYLARGETABLE)
for result in large.fetchall()