Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sqlite3 like python

cur.execute("select * from contacts where name like ?", ('%'+search+'%',))

#Your problem just seems to be that you have supplied a string as the second 
#argument to cur.execute, when you probably meant to supply a single-element tuple 
#containing the string.

#Since a string is a sequence, every character in the string will be interpreted 
#as a separate parameter and that's why you see the "Incorrect number of bindings" 
#error.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
4+5 =