0

i know my issue is simple but i could not find a solution anywhere, i need to assign a python variable to mysql @variable like this .

cur=db.cursor()
val =50
cur.execute('SET @var := (val)')
cur.execute('SELECT @var ;')
x=cur.fetchone()
cur.close()

i want to assign python a changing variable "val" to Mysql @var,

KKO
  • 1
  • 1
    Does this answer your question? [MySQL parameterized queries](https://stackoverflow.com/questions/775296/mysql-parameterized-queries) – Henry Woody May 21 '22 at 01:24

0 Answers0