Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error when dealing with uuid
#13
(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()
Reply


Messages In This Thread
error when dealing with uuid - by vj78 - Apr-10-2021, 02:07 PM
RE: error when dealing with uuid - by ibreeden - Apr-11-2021, 09:42 AM
RE: error when dealing with uuid - by vj78 - Apr-11-2021, 10:26 AM
RE: error when dealing with uuid - by vj78 - Apr-11-2021, 10:26 AM
RE: error when dealing with uuid - by ibreeden - Apr-11-2021, 11:52 AM
RE: error when dealing with uuid - by vj78 - Apr-11-2021, 02:39 PM
RE: error when dealing with uuid - by vj78 - Apr-11-2021, 03:14 PM
RE: error when dealing with uuid - by vj78 - Apr-11-2021, 05:34 PM
RE: error when dealing with uuid - by ibreeden - Apr-11-2021, 06:14 PM
RE: error when dealing with uuid - by vj78 - Apr-11-2021, 09:23 PM
RE: error when dealing with uuid - by vj78 - Apr-12-2021, 01:10 AM
RE: error when dealing with uuid - by ibreeden - Apr-12-2021, 07:33 AM
RE: error when dealing with uuid - by vj78 - Apr-12-2021, 09:03 AM
RE: error when dealing with uuid - by ibreeden - Apr-12-2021, 10:25 AM
RE: error when dealing with uuid - by vj78 - Apr-12-2021, 02:17 PM
RE: error when dealing with uuid - by ibreeden - Apr-12-2021, 05:59 PM
RE: error when dealing with uuid - by vj78 - Apr-13-2021, 12:16 AM
RE: error when dealing with uuid - by snippsat - Apr-13-2021, 12:10 PM
RE: error when dealing with uuid - by vj78 - Apr-13-2021, 01:25 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020