Так делать НЕ нужно
Тут не пхп
sql = "INSERT INTO groups(group_id, group_name, short_link) VALUES (%s, %s, %s)" , (gid, name, screen_name)
print(type(sql))
sql = "INSERT INTO groups(group_id, group_name, short_link) VALUES (%s, %s, %s)" % (gid, name, screen_name)
print(type(sql))
Нужно делать через
https://dev.mysql.com/doc/connector-python/en/conn...sql = "INSERT INTO groups(group_id, group_name, short_link) VALUES (%s, %s, %s)"
cursor.execute(sql, (gid, name, screen_name))
или так
sql_prepared_text = "INSERT INTO groups(group_id, group_name, short_link) VALUES (%s, %s, %s)", (gid, name, screen_name)
cursor.execute(*sql_prepared_text)