I have to execute the following SQL query: query = """SELECT id FROM my_table \ WHERE my_table.some_id IN %s""" cursor.execute(query, [(1, 2, 3)])
and the aim would be to replace the %s with the tuple (1, 2, 3) but I get the following error: Traceback (most recent call last): File "<pyshell#385>", line 1, in <module> cursor.execute(query, [(1, 2, 3)]) File "C:\Python25\lib\site-packages\django\db\backends\util.py", line 12, in execute return self.cursor.execute(sql, params) File "C:\Python25\lib\site-packages\django\db\backends \sqlite3\base.py", line 94, in execute return Database.Cursor.execute(self, query, params) OperationalError: near "?": syntax error Is this a bug related to sqlite3 (which I'm using in this case) or am I doing something wrong? Any help would be highly appreciated. Many thanks Francesco --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---