Hi
I wanted to know how can I make sure that table exist in my database.
class Record:
def __init__(self):
self.conn = MySQLdb.connect( host = 'localhost', user = 'root', passwd = 'abcd', db = 'justfun')
self.cursor = self.conn.cursor()
self.cursor.execute("DROP TABLE IF EXISTS book")
self.cursor.execute( """CREATE TABLE book (name char(40), lastname char(40), petname char (40)) """)
main()
Rec = Record()
The problem here is how can i check if my table exist or not.
I dont want to create a table if its already exists.
Thanks .