I have the following with sqlite3:
urls = c.execute('SELECT URL FROM LINKS WHERE URL = ?', url).fetchall()

But this gives:
Traceback (most recent call last):
  File "./createDB.py", line 52, in <module>
    urls = c.execute('SELECT URL FROM LINKS WHERE URL = ?', url).fetchall()
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current 
statement uses 1, and there are 40 supplied.

The number of bindings is the length of the string.
What is happening here? Why is every character of the string seen as a
binding, instead of the string being the binding?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to