I am attempting to use a parametrized LIKE query with Python's Sqlite library as below:
self.cursor.execute("select string from stringtable where string like '%?%' and type = ?", (searchstr,type))
but the ? inside of the wildcard is not being evaluated leaving me with this error:
"sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 2 supplied."
I also tried to use the tagged version of querying with:
like '%:searchstr%' and in the list having {"searchstr":searchstr...
but when I do that the query runs but never returns any results even though manually putting in "like '%a%'"... return hundreds of results as it should
any suggestions please?