Python/MySQL: Inserting date into table using a variable table name


conn.execute("""insert into %s (a, b, c, d) values(%%s, %%s, %%s, %%s)""" %tablename,(a, b, c, d))

Leave a Reply

Your email address will not be published. Required fields are marked *