a newbie question about gadfly

gbreed at cix.compulink.co.uk gbreed at cix.compulink.co.uk
Tue Jun 12 17:34:16 CEST 2001

In article <hrbcit86g5gbmc63em9gc6tsji7nv78dqr at 4ax.com>, 
jm7potter at hotmail.com () wrote:

> Why? is namex not a direct replacement for "donna" ????

Um, no, not the way you're doing it.  Try replacing that magic 
line with

  "insert into students (name, grade) values (%s, %s)"
  % (namex, gradex))

Or even

cursor.execute("insert into students (name, grade) values 
(%(namex)s, %(gradex)s)" % vars())

(that's sure to wordwrap!)


More information about the Python-list mailing list