> 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
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
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(
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