Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34600

Re: MySQLdb insert HTML code error

References <CAKhY55Nfq7+CsjqrksdGYxODNYUvBSowXQYjZ6-FzxQeOgBnUQ@mail.gmail.com> <oqmdc896cjrv5ngb2n4mr9sstbr0i7cmti@invalid.netcom.com>
From Anatoli Hristov <tolidtm@gmail.com>
Date 2012-12-11 08:41 +0100
Subject Re: MySQLdb insert HTML code error
Newsgroups comp.lang.python
Message-ID <mailman.710.1355211690.29569.python-list@python.org> (permalink)

Show all headers | View raw


>
>    First thing -- DON'T put quotes around the %s place-holders... The
> whole purpose of using the parameterized .execute() is to let the
> database adapter properly escape the parameters before putting them into
> the SQL (since MySQL didn't have prepared statements before v5, it was
> producing full SQL statements for each insert, even with .executemany()
> )

Thank you, this solved my problem.:)

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: MySQLdb insert HTML code error Anatoli Hristov <tolidtm@gmail.com> - 2012-12-11 08:41 +0100

csiph-web