I m not sure this is your case but i believe you are missing the
"cur.fetchall()" command which does fetch data from sql db ....
i suggest you put a print statement for every data you use in your program
that way you know whats empty & whats not...
here is example of MySQLdb process:

con=MySQLdb.connect(host='xxxxx', user='xxxxx', passwd='xxxxx',
db='xxxxxxxx' )
cur)

cur=con.cursor()

my_cmd="select %s from xxxx where fieldx= '%s' ; " % (var1, var2)
cur.execute(my_cmd)

#now the cmd you are missing :

data=cur.fetchall()

# & then comes the :

for i in data:
 print i


hope this helps
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to