cursor.execute with multiple parameters might be broken
Hi there,
I'm having trouble with cusor.execute with multiple parameters. This works fine:
cursor.execute("SELECT '%s' FROM '%s'" % (column,expt_id))
However, it is not advised, according to the documentation. For one parameter, this works:
cursor.execute("""SELECT %s FROM '99'""", ["test"])
I just cannot get multiple parameters to work, e.g.:
cursor.execute("""SELECT %s FROM %s""", ["test","99"])
I've tried everything I can think of here! Been at it for hours. Would much appreciate your insight.
Thanks, Andy.
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/GubEZvQ-0toJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home