Reputation: 1
I have tried this code but i receive the 1064 error.
x_1=**********
t_2=(x_1)
cursor.execute('insert into informations' '(password)' 'values (%s)',t_2)
Upvotes: 0
Views: 39
Reputation: 146
cursor.execute('insert into informations (password) values (?)', (x_1,))
would be a better syntax.
Just one string including the whole statement and using a question mark as placeholder for the value to insert.
The most important is to define the single value into a tuple.
Upvotes: 1