All pastes #895382 Raw Edit

Someone

public text v1 · immutable
·published 2008-02-07 19:54 UTC
rendered paste body
import pg
foobar=1
connection=pg.connect(dbname='foobar', host='localhost', user='postgres')
results=connection.query("select * from testtable where id=%s", (foobar,))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: query(sql), with sql (string).
>>> 

and the rsults should be Sherif Nagy