[mod_python] Problem with html quoted/unquoted

Wouter van Marle wouter at squirrel-systems.com
Mon May 22 23:18:12 EDT 2006

On Wed, 2006-05-17 at 18:09 -0400, Jim Gallacher wrote:
> >> cur.execute("SELECT * FROM base WHERE field = %s", s)
> > 
> > I have tried this (once) with MySQLdb, and it doesn't seem to work
> like
> > that. (v1.2.1g2) Didn't pursue the issue further.
> You must be doing something wrong. A quick test on my system:
>  >>> s = """This is 'some' stuff with "quotes" and stuff"""
>  >>> cursor.execute('insert into testtable (data) values (%s)', s)
> 1L

Just tried it for myself - it works now.
Maybe I had an older version of MySQLdb when testing? I don't know
anymore. I'll follow your advice and fix my code!

And after that the info in the databases... that's going to be a harder


More information about the Mod_python mailing list