alexbprofit, Спасибо, а можете подсказать почему uid у всех 0?, user_id не смог в бд передать потому что выходит ошибка с атриботом, и 1 и того же пользователя заносят в бд несколько раз
Алан Гибизов, C:\Users\Audra\Desktop\test>start.py
Traceback (most recent call last):
File "C:\Users\Audra\Desktop\test\start.py", line 21, in
text = functions.reg_chat(event.message.peer_id, owner_id)
File "C:\Users\Audra\Desktop\test\plugins\functions.py", line 18, in reg_chat
cursor.execute(f"CREATE TABLE `{peer_id}`("
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\cursors.py", line 163, in execute
result = self._query(query)
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\cursors.py", line 321, in _query
conn.query(q)
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\connections.py", line 505, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\connections.py", line 724, in _read_query_result
result.read()
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\connections.py", line 1069, in read
first_packet = self.connection._read_packet()
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\connections.py", line 676, in _read_packet
packet.raise_for_error()
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\protocol.py", line 223, in raise_for_error
err.raise_mysql_exception(self._data)
File "C:\Users\Audra\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pymysql\err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DEFAULT 'null', `admin` INT NOT NULL DEFAULT '0', `warn` INT NOT NULL DEFAULT '0' at line 1")
C:\Users\Audra\Desktop\test>pause
Для продолжения нажмите любую клавишу . . .