Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import psycopg2
- con = psycopg2.connect(host='localhost', database='regiao',
- user='postgres', password='postgres123')
- cur = con.cursor()
- sql = "select idioma from chat where id = 1"
- cur.execute(sql)
- recset = cur.fetchall()
- for rec in recset:
- print (rec)
- con.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement