Advertisement
Guest User

Untitled

a guest
Feb 9th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import psycopg2
  2.  
  3. class utenti(object):
  4.     def registra(self, email, nickname, passwrd):
  5.         conn = psycopg2.connect("dbname='FANTAGOL' user='tonyfrancis' host='localhost' password='marianeri'")
  6.         cur = conn.cursor()
  7.         cur.execute("INSERT INTO Giocatori (email, nickname, passwrd) VALUES (%s, %s, %s)", (email, nickname, passwrd))
  8.         conn.commit()
  9.         cur.close()
  10.         conn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement