0
存儲我是新來使用MySQL和我想從我的數據庫檢索和可變打印/存儲。我到目前爲止已經做到了這一點:讀/從MySQL使用變量蟒蛇
import mysql.connector
conn = mysql.connector.connect(database = 'UserInfo')
mycursor = conn.cursor()
Username = "Max"
Login = ("SELECT username, password FROM UserInfo.User "
"WHERE username = '%s'")
mycursor.execute(Login, (Username))
print((username, password) in mycursor)
mycursor.close()
conn.close()
有什麼問題嗎? – ryanyuyu 2015-03-02 20:48:08