Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Update_bd_three_hundred:
- connection = pymysql.connect(host="localhost",
- user="root",
- password="Pr0st1_Mn6Pred6t'cia",
- db="users_db")
- def verification_id_three_hundred(self):
- with self.connection:
- cursor = self.connection.cursor()
- cursor.execute("SELECT user_id FROM three_hundred")
- return [x[0] for x in cursor.fetchall()]
- def update_bd_for_user_id_three_hundred(self, user_id):
- with self.connection:
- cursor = self.connection.cursor()
- if user_id not in self.verification_id_three_hundred():
- cursor.execute("INSERT INTO three_hundred VALUES(%s,%s,%s)", (user_id, 'Нет', 'нет'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement