Why do this?
Duncan Booth
duncan.booth at invalid.invalid
Mon Oct 9 07:18:59 EDT 2006
Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
>>> I use the above when I can, when I can't I fall back on
>>><http://groups.google.co.nz/groups?selm=efc5b3$can$1@lust.ihug.co.nz>,
>>><http://groups.google.co.nz/groups?selm=efhn5v$fia$2@lust.ihug.co.nz>.
>>
>> Yes, so you said, but you never came up with a convincing use case
>> where that function was better than using the parameterised queries.
>
> First of all, the parametrization doesn't handle wildcards, as we
> discussed previously.
No, your separate function for escaping wildcards is fine, and works in
conjunction with parameterized queries. It's the SQLString function you
never managed to justify.
> Secondly, it's less convenient for cases where a dynamic query is being
> built. I previously gave the SQLStringList example. If that's not enough,
> here's another (simple) one:
See Frederik's excellent response on this point.
More information about the Python-list
mailing list