def copy_sql_db(storage_connection, mysql_connection, date):
cursor = storage_connection.cursor()
mysql_cursor = mysql_connection.cursor()
if date == "ALL":
cursor.execute("""select name, test_time, id from test_table""")
else:
cursor.execute("""select name, test_time, id from test_table where test_time > (CURDATE() - INTERVAL date day)""")
...
I do not know what to search for to get the variable date that I pass into my function, copy_sql_db into my else: cursor.execute...when I run the script created I get there is an error in the SQL syntax near where test_time > date.