All pastes #895376 Raw Edit

Someone

public text v1 · immutable
·published 2008-02-07 19:46 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))

error = TypeError: query(sql), with sql (string).

results should be my name from the database 
Sherif Nagy