每当我执行这个函数时,我的程序就会生成一个错误。在
def SubmitDetailsL ():
LeaderID=random.randint(1,10000)
print(LeaderID)
UserID=random.randint(1,10000)
print(UserID)
UserID=str(UserID)
sqlcommand="INSERT INTO leaderinfo (leaderID, firstname,secondname,age,gender,ethnicity,address,postcode,telephone,email,userID) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
LeaderInput= (LeaderID,FName.get(),SName.get(),Age.get(),Gender.get(),Ethnicity.get(),Address.get(),Postcode.get(),TelephoneNum.get(),Email.get(),UserID)
mycursor.execute(sqlcommand,LeaderInput)
mydb.commit()
print("Completed Transaction")
sqlcommandU="INSERT INTO usercredentials (userID) VALUES (%s)"
mycursor.execute(sqlcommandU,UserID)
mydb.commit()
print("Completed Transaction")
raise_frame(Credentials)
return(UserID)
这是导致错误的特定行:
^{pr2}$这看起来很奇怪,因为只有一个数据条目被插入到usercredentials表中。在
目前没有回答
相关问题 更多 >
编程相关推荐