logo       

query: msg#00073

python.db.psycopg.devel

Subject: query

i'm migrating from pypgsql to psycopg, and psycopg has an issue with this query string.

curpg.execute("""SELECT till_name,till_float
FROM till_config
JOIN transactions
USING (id)
WHERE for_venue = %s""",(Venue))

the error is as follows

psycopg.ProgrammingError: ERROR: syntax error at or near "Cow" at character 102

SELECT till_name,till_float
FROM till_config
JOIN transactions
USING (id)
WHERE for_venue = Mad Cow

now i understand why it's erroring on that sql, but why isn't psycopg quoting it for me?


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise