Advertisement
xotohop

sqlpizda

Dec 8th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. res = input('Resource: ')
  2.         current_username = input('Current username: ')
  3.         username = input('New username: ')
  4.         password = input('New password: ')
  5.  
  6.         cursor = conn.cursor()
  7.  
  8.         # Изменение записи
  9.         edit = """
  10.              UPDATE passwords
  11.              SET username = {username}'
  12.              SET password = {password}'
  13.              WHERE username = {current_username}'
  14.              """
  15.         cursor.execute(edit)
  16.  
  17.         # Сохраняем изменения
  18.         conn.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement