cur.execute("DELETE link FROM whitelist WHERE chat_id = ? AND link = ?", (message.chat.id, link))
sqlite3.OperationalError: near "link": syntax error
код:
@han.message_handler(commands=["remove_link", "rwl"], is_admin=True)
async def LinkDelete(message: types.Message):
link = GetLink(message)
param = cur.execute("SELECT link FROM whitelist WHERE chat_id = ? AND link = ?", (message.chat.id, link))
if param.fetchall() is not None:
cur.execute("DELETE link FROM whitelist WHERE chat_id = ? AND link = ?", (message.chat.id, link))
db.commit()
await message.reply("Link deleted from whitelist")
else:
await message.reply("The link has already been removed from the whitelist")
Что значит DELETE link FROM whitelist?
раньше это работало
какая БД?
sqlite3
Обсуждают сегодня