Answer the question
In order to leave comments, you need to log in
How to avoid mistakes?
Bot on aiogram, you need to remove the column:
@dp.message_handler(commands=['test'])
async def test(message: types.Message):
conn = sqlite3.connect('db.db')
cur = conn.cursor()
number = "md" + str(message.get_args())
cur.execute("ALTER TABLE users DROP COLUMN '%s'" % number)
conn.commit()
await message.reply('готово')
cur.execute("ALTER TABLE users drop column '%s'" % number)
sqlite3.OperationalError: near "drop": syntax error
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question