[Tutor] Python + MySQL , my first simple program does not gives results
Pujo Aji
ajikoe at gmail.com
Thu Jan 19 14:19:00 CET 2006
>
> 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 at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060119/04c9d606/attachment.htm
More information about the Tutor
mailing list