Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name1 = 'Andres' phone1 = '3366858' email1 = 'user@example.com' # A very secure password password1 = '12345' try: with db: db.execute('''INSERT INTO users(name, phone, email, password) VALUES(?,?,?,?)''', (name1,phone1, email1, password1)) except sqlite3.IntegrityError: print('Record already exists') finally: db.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement