From: Mike W. <mw...@mi...> - 2002-07-04 19:11:34
|
Yes, absolutely. I wrote a content management system using PyPgSQL and came to love the DB-API style. Makes life easy. And safe. Apparently I've forgotten that for the quick reporting hack example I provided ! At 09:01 PM 7/4/2002 +0200, Gerhard =?iso-8859-15?Q?H=E4ring?= wrote: >In this case it works to use Python quoting. But it's good for you [tm] >to get used to the DB-API style of quoting: > >query_string = 'delete from pbsp where extract(epoch from (now() - > since)) >= %s' > cursor.execute(query_tring, (purge_age,)) |