Re: providing arguements updated

Karsten Hilbert <[email protected]> Sun, 28 Nov 2004 10:37:50 +0100
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
> cur.execute("select daily_takings.cash, transactions.for_date from 
> transactions, daily_takings, daily_stats where transactions.id = 
> daily_takings.id and transactions.for_date >= %s and 
> transactions.for_date <= %s and transactions.for_venue = %s and 
> (EXTRACT(DOW FROM transactions.for_date)::integer+6) % 7 BETWEEN %s AND 
                                                       ^
you need to escape that %, eg. write %%

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/