I am trying to write a function that takes the variable written in the function placeholder() written below and then uses that in MySQL queries
placeholder()
sql = "TRUNCATE TABLE " + placeholder_variable + ";" cursor.execute(sql)
SQL parameters cannot be used for metadata with MySQL. You will need to sanitize the value and substitute it normally.