Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql.connector.errors.ProgrammingError: Not all parameters were used in the SQL statement
- import mysql.connector
- for table in tables:
- sql = """insert into close_price select * from ? where identifier = 'OMXS30' and seconds_offs = (select max(seconds_offs)
- from ? where seconds_offs <= 55800 and identifier = 'OMXS30'"""
- cursor = mySQLconnection.cursor()
- cursor.execute(sql, [table[0], table[0]])
- for table in tables:
- sql = """insert into close_price select * from {} where identifier = 'OMXS30' and seconds_offs = (select max(seconds_offs)
- from {} where seconds_offs <= 55800 and identifier = 'OMXS30'""".format(table[0], table[0])
- cursor = mySQLconnection.cursor()
- cursor.execute(sql)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement