You should fetch the results.

   try:
   result = cursor.fetchall()
   print result



Cheers,
pujo

 

import MySQLdb
class learnpython_db:
        def __init__(self):
                db =
MySQLdb.connect(host="localhost",user =
"john",password = "asdlkj", db = learnpython)
                cursor = db.cursor()
                cursor.execute (" describe contact" )
                cursor.execute(" SELECT * from
contact" )








___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
_______________________________________________
Tutor maillist  -   Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

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

Reply via email to