Apr-12-2021, 01:10 AM
Ok, as per suggestion, I used python to include the UUID() in the INSERT statement and it works.
I have another error when I use %s. The reason I said %s is when I hard code the values it works.
Error Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s, %s, uuid())'
I have another error when I use %s. The reason I said %s is when I hard code the values it works.
Error Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s, %s, uuid())'
mydb = mysqldb.connect(host="xxxxx", user="xxxxx",password="xxxxxxx", db="xx", use_unicode=True,charset="utf8") mycursor = mydb.cursor() myparams = (username, password, ) print(myparams) mysql = mycursor.execute("INSERT INTO user (username, userpassword, userguid ) VALUES (%s, %s, uuid())") myresult = mycursor.execute(mysql, myparams) mydb.commit() return (myresult)