Reputation: 33
I am getting an error with the second placeholder on MySQL query:
photo_number_value = c.execute('INSERT into ebay VALUES (?,?)', photo_number_key,photo_number)
the error that I'm getting is:
unexpected argument
Upvotes: 1
Views: 1857
Reputation: 77377
Syntax errors and "unexpected argument" errors are different things. But since execute
only takes two parameters, I'll go with the latter. You need to put the parameter values into a list or tuple to make it work:
photo_number_value = c.execute('INSERT into ebay VALUES (?,?)',
(photo_number_key,photo_number))
Upvotes: 3