Как исправить ошибку MySQL?

Вот код, который должен удалять запись после запроса.

cnx = mysql.connector.connect(
   host="localhost",
   port=3306,
   user="root",
   database = 'diss',# название БД
   password="")# Если пароль есть, то нужно указывать   
cur = cnx.cursor(buffered=True) 
cur.execute("select owner from shop ORDER BY RAND()") #Вместо price пишите столбец который вам нужен
result = cur.fetchone()
for x in result:
    print(x); 
    cur.execute('delete from shop where owner = %s', (result[0]))
    cnx.commit()
    cnx.close() 
    channel = await bot.fetch_channel(967746240601292813) 
    await channel.send(f'Ваш код:{ result[0]}',)

И следующая ошибка:

Could not process parameters: str(2), it must be of type list, tuple or dict.

Не могу найти такой данный тип данных.


Ответы (0 шт):