QuoteSQL

Carsten Haese carsten at uniqsys.com
Tue Sep 26 16:01:04 CEST 2006


On Tue, 2006-09-26 at 07:08, Lawrence D'Oliveiro wrote:
> So yes, there should be two separate functions, one for escaping
> non-wildcard specials, and one for escaping wildcards.
> 
> > You only need the first one, since every database interface that
> > follows PEP 249.
> 
> You still need the second one, in instances like the QuoteSQLList example I
> gave earlier.

"Need" is a strong word unless something like the following doesn't work
for some reason:

cur.execute("select * from people where last_name in (%s,%s,%s)",
(name1, name2, name3) )

-Carsten





More information about the Python-list mailing list