MySQL adapter question
Pop Tufty
poparosa at aol.com
Mon Sep 11 20:43:02 EDT 2000
I am using the MySQL database adapter for looking
at data that is in my database - so I can graph it later.
I do the following:
DBH = MySQL.connect() # localhost
DBH.selectdb("mydb")
STH = DBH.query("select Measurement from tablea")
for i in STH.fetchrows():
print "field data is "
print STH.data[i]
The STH.data[i] line does not work. What do
I put there to iterate along the values returned from
the query?
If I put only the first print in, I get the right number of
printed lines, but I do not know how to reference the
actual data value returned from the query...
thanks for the assistance
More information about the Python-list
mailing list