I need help with the following scenario:
in my database file I have a table who looks something like this
I want to get a list of all the IDs that have suppliers_id=(2,3)
(list of ids)
the problem is that I don't know which values are in the group (I'm getting the list in the function header from other SELECT function)
We were taught that we can use IN option that should get me the result I want but I cant getting it to work
my code (doesn't work for now):
def update(self, suppliers_id):
c = self._conn.cursor()
c.execute("""SELECT id FROM Vaccines WHERE supplier_id IN (?)""", [suppliers_id])
I'm getting sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
error
Thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…