as fredrik and others have mentioned, '%%' in a format string gives
you the single '%' in the string as desired.

however, in your specific application (database), it's best to avoid
using Python's string formatting unless that is the default provided
by your database adapter for the reasons that carsten mentioned,
namely the possibility of a SQL injection attack.  when dealing with
databases, it's always safest to let the adapter code format your
string for you.

good luck!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
    http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to