Apr-12-2021, 09:03 AM
(Apr-12-2021, 07:33 AM)ibreeden Wrote:(Apr-12-2021, 01:10 AM)vj78 Wrote: mysql = mycursor.execute("INSERT INTO user (username, userpassword, userguid ) VALUES (%s, %s, uuid())")I think you should do:
myparams = (username, password, uuid() ) ... mysql = mycursor.execute("INSERT INTO user (username, userpassword, userguid ) VALUES (%s, %s, %s)")
I have updated the code: (It is still giving me the same error message)
myparams = (username, password, uuid.uuid1(), ) print(myparams) mysql = mycursor.execute("INSERT INTO user (username, userpassword, userguid ) VALUES (%s , %s, %s)") myresult = mycursor.execute(mysql, myparams) mydb.commit()