Updating a filename's counter value failed each time

Jens Thoms Toerring jt at toerring.de
Mon Jun 17 15:16:02 EDT 2013


MRAB <python at mrabarnett.plus.com> wrote:
> On 17/06/2013 19:32, Jens Thoms Toerring wrote:
> > As I wrote you need *single* quotes around strings in
> > SQL statements. Double quotes won't do - this is SQL
> > and not Python so you're dealing with a different lan-
> > guage and thus different rules apply. The triple single
> > quotes are seen by Python, but SQL needs its own.
> >
> The query looks safe to me as he _is_ using a parametrised query.

Perhaps - the OP never told which API (or database) he
is using. What about some API that simply connects the
first argument of exxecute() with the second with just
a simple '%' to construct the string for the SQL state-
ment? In that case there would be no single quotes a-
round strings, or would there?

                           Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt at toerring.de
   \__________________________      http://toerring.de



More information about the Python-list mailing list