Z
Z
zax20022019-01-19 20:06:01
Python
zax2002, 2019-01-19 20:06:01

How to use the sqlite3 library to get all records by value from a list, using the safe "?"?

I did something like this:

cur.execute("SELECT * FROM tags WHERE tag IN ?", (["test1", "test2"],))

But nothing comes out.
(Update): The number of tags is not constant

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question