Hi
I am trying to do this for a Postgresql database:
conn = psycopg2.connect('host=localhost')
cur = conn.cursor()
cur.execute("SELECT * FROM names WHERE name=%s", ['S'])
, which doesn't work, and neither does
cur.execute("SELECT * FROM names WHERE name='%s'", ['S'])
or
cur.execute("SELECT * FROM names WHERE name='S'")
work. It always returns:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
psycopg2.ProgrammingError: array value must start with ?{½ or
dimension information
Though, when doing
cur.execute("SELECT * FROM names")
it works.
I am totally helpless here. Does anyone have an idea?
Cheers
Andre
--
http://mail.python.org/mailman/listinfo/python-list