Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- outcoming = [445557378, 54667402, 11365645, 52258043, 332914832, 357652627, 276344229, 170537256, 480499887, 226384949, 81816373, 230656439, 164630458, 178836923, 310206267, 155180221, 264821829, 2146377, 170161869, 91485777, 64653010, 229433813, 277918294, 436511322, 63895647, 171503843, 56553574, 429354732, 61759727, 122231536, 442422643, 426659704, 317070969, 52351738, 192707195, 24703613]
- import mysql.connector
- database = mysql.connector.connect(user=settings.db_login, password=settings.db_password,
- host=settings.dp_ip, database=settings.db_name, use_unicode=True,
- charset='utf8', collation='utf8_general_ci', autocommit=True)
- cursor = database.cursor()
- cursor.execute("""DELETE from list_of_tables WHERE user_id = (%s)""", (outcoming))
- for user_id in outcoming:
- cursor.execute("""DELETE from list_of_users WHERE user_id = (%s)""", (user_id))
- for id in outcoming:
- cursor.execute("""DELETE from list_of_tables WHERE user_id = (%s)""", (id))
Add Comment
Please, Sign In to add comment