Re: [Tutor] Python + MySQL , my first simple program does not gives results

2006-01-19 Thread Alan Gauld
> 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 First of all you have only defined init() but not created an instance so it never actually gets called! But if you do call

Re: [Tutor] Python + MySQL , my first simple program does not gives results

2006-01-19 Thread Danny Yoo
On Thu, 19 Jan 2006, John Joseph wrote: > Hi >I tried out my first Pyhton program with MySQL > I was trying to get the some result , eg > describe table, select * from table Hi John, Unlike Java, Python doesn't force you to put everything in a class. You can try the simpl

Re: [Tutor] Python + MySQL , my first simple program does not gives results

2006-01-19 Thread Pujo Aji
You should fetch the results.   try:    result = cursor.fetchall()   print result Cheers,pujo import MySQLdbclass learnpython_db:def __init__(self): db =MySQLdb.connect(host="localhost",user ="john",password = "asdlkj", db = learnpython)cursor = db.cursor(

[Tutor] Python + MySQL , my first simple program does not gives results

2006-01-19 Thread John Joseph
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 P