1

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

1 Answer 1

3

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))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.