On Aug 22, 9:14 pm, kevin <kevin.sangh...@gmail.com> wrote: > cursor.execute("SELECT a,b,c FROM Table_Name WHERE a = %s AND b = %s ", > [string1],[string2]) > > gives me the following error: > > TypeError: execute() takes at most 3 arguments (4 given) > > Where did i go wrong?
You have got string1 and string2 in separate lists. Should be: cursor.execute("SELECT a,b,c FROM Table_Name WHERE a = %s AND b = %s ", [string1, string2]) --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---