MySQLdb select

R Baumann
Sat Jul 31 16:55:51 CEST 2004

"Gerhard Häring" <gh at> wrote in message
news:mailman.1008.1091284523.5135.python-list at
> F. GEIGER wrote:
> > "John Fabiani" <jfabiani at> schrieb:

> Then use %i for integers ;-)
> > I'm used to do that this way:
> >
> > cursor.execute("SELECT * FROM mytest where clientID = %d" % numb)
> That's particularly BAD STYLE. It's best to keep to letting the DB-API
> do the proper quoting for all parameters.
> -- Gerhard

Gerhard,  I really have no intention of starting a pissing match with you or
anyone else on this ng,  but when you tell someone else that a particular
piece of code is BAD STYLE without showing an example of GOOD STYLE, it
pisses me off.  The newbies here (myself included) don't learn anything, and
IMO, that what the newsgroups are for, to pass along hints, tips, and
knowledge from people who DO know what's right and what's wrong.  How about
an example?


More information about the Python-list mailing list