1
我爲什麼要引用cursor.fetchall(),如果我能cursor.execute直接使用?一個如果我可以直接使用cursor.execute,爲什麼要引用cursor.fetchall()?
感謝
我爲什麼要引用cursor.fetchall(),如果我能cursor.execute直接使用?一個如果我可以直接使用cursor.execute,爲什麼要引用cursor.fetchall()?
感謝
因爲cursor.execute()
實際上並不返回數據。想必你需要這個,所以你需要運行fetchall
。
在循環中,它就像fetchall一樣工作! – relima 2010-11-14 18:10:01
安,我現在明白,它只是不「回」。儘管我可以在循環中使用它。好。謝謝! – relima 2010-11-14 18:10:38