diff options
author | Federico Di Gregorio <fog@initd.org> | 2005-03-12 06:39:47 +0000 |
---|---|---|
committer | Federico Di Gregorio <fog@initd.org> | 2005-03-12 06:39:47 +0000 |
commit | 9316c6af537b17d3ecfc70b81aa9183a7023a99b (patch) | |
tree | 197c635da0a0ed590f891707572b083e71af5e6c /examples/lastrowid.py | |
parent | c639b92bd9c277c5504fee6cc38bd8d94414e9b1 (diff) | |
download | psycopg2-9316c6af537b17d3ecfc70b81aa9183a7023a99b.tar.gz |
Optimizations to type casting (in preparation to array support.)
Diffstat (limited to 'examples/lastrowid.py')
-rw-r--r-- | examples/lastrowid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/lastrowid.py b/examples/lastrowid.py index aa57850..4b01c85 100644 --- a/examples/lastrowid.py +++ b/examples/lastrowid.py @@ -49,10 +49,10 @@ curs.execute("""INSERT INTO test_oid moid = curs.lastrowid print "Oid for %(name)s %(surname)s" % data[1], "is", moid -curs.execute("SELECT * FROM test_oid WHERE oid = %d", (foid,)) +curs.execute("SELECT * FROM test_oid WHERE oid = %s", (foid,)) print "Oid", foid, "selected %s %s" % curs.fetchone() -curs.execute("SELECT * FROM test_oid WHERE oid = %d", (moid,)) +curs.execute("SELECT * FROM test_oid WHERE oid = %s", (moid,)) print "Oid", moid, "selected %s %s" % curs.fetchone() curs.execute("DROP TABLE test_oid") |