Hi I tried out my first Pyhton program with MySQL I was trying to get the some result , eg describe table, select * from table but my program does not give the expected results , nor it gives any error I am adding my code in this mail Please guide me , why I am not getting any results displayed Thanks Joseph John *******************************************************************************8
""" For learning for To connect to a database "learnpython" , with mysql user name "john" password "asdlkj" To describe a table "contact" To get result of SQL statement """ 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