strange use of %s

Chris Angelico rosuav at gmail.com
Mon Apr 25 18:10:26 EDT 2011


On Tue, Apr 26, 2011 at 8:01 AM, John Nagle <nagle at animats.com> wrote:
> Don't worry about having MySQL do the CONCAT.  That happens
> once during query parsing here, because all the arguments to
> CONCAT are defined in the statement.
>

Good point. Although the abstraction is still a little leaky in that
you can't use this to search for a percent character anywhere in the
string (come to think of it, how _would_ you do that? I think you'd
have to backslash-escape it, prior to escaping it for the string, but
I'd have to check), so it doesn't make a lot of difference where the
percent signs are added.

Chris Angelico



More information about the Python-list mailing list