Возникла проблема при создании таблицы в SQLite3 напрямую через код
Сам код:
chatid = message.chat.id
c.execute("""CREATE TABLE IF NOT EXISTS ?(
id INT,
admins INT,
nick TEXT,
warns INT,
vip INT), (chatid,)
""")
db.commit()
await message.answer("Табличка создана")
При попытке все это выполнить, вылезает трейсбэк:
Traceback (most recent call last):
File "C:\Users\Глеб\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "C:\Users\Глеб\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "C:\Users\Глеб\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\Глеб\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 256, in process_update
return await self.message_handlers.notify(update.message)
File "C:\Users\Глеб\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\!python\проекты\bot_chat\main.py", line 64, in botstart
c.execute("""CREATE TABLE IF NOT EXISTS ?(
sqlite3.OperationalError: near "?": syntax error
[?]
.execute
?