I'm attempting to post data to a table where the name of the table is a variable, i receive no errors, however no data is posting.
cursor = db.cursor()
cursor.execute('DROP TABLE IF EXISTS %s' %data[1])
0L
sql ="""CREATE TABLE %s (IP TEXT, AVAILIBILITY INT)""" %data[1]
cursor.execute(sql)
0L
for key in data[0]:
print type(key), type(data[0][key])
sql = """INSERT INTO %s VALUES (%s,%s)""" %(data[1],key,data[0][key])