Привет у меня есть проблемы с базами данных и python, чему не удалось найти ошибку, ошибка qeu выходит - следующий:
MySQLdb._exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%s)' at line 1")
мой код, где он не удается, - этот:
def create_xls(data):
# Creo el XLSX
df = pd.DataFrame(data)
xls = df.to_excel('Planificador.xlsx', sheet_name='Resultados')
# Coneccion a base de datos
cur = mysql.connection.cursor()
cur.execute('INSERT INTO tablas_excels (tablas) VALUE (%s)', (xls))
mysql.connection.commit()
def create_xls(data):
# Creo el XLSX
df = pd.DataFrame(data)
xls = df.to_excel('Planificador.xlsx', sheet_name='Resultados')
# Conexión a base de datos
cur = mysql.connection.cursor()
cur.execute('INSERT INTO tablas_excels (tablas) VALUE (%s);', (xls))
mysql.connection.commit()