Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import psycopg2
- # print "Content-type: text\html"
- # print
- conn = psycopg2.connect("dbname='alunos'user='postgres'host='localhost'password='postgres'");
- c = conn.cursor()
- c.execute("SELECT estado FROM informacoes WHERE nome = 'fabio'")
- # c.execute("insert into informacoes (nome,estado,populacao) values ('fabio','pr', 123);
- ")
- records = c.fetchall()
- # import pprint
- # pprint.pprint(records)
- print(records)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement