I'm trying to insert data using psycopg2 into postgres. Here is the psuedo code I have. It seems to run without error but when I use navicat to check, it doesn't seem to update in the database. I did restart navicat to be sure.
conn = psycopg2.connect("dbname=dbname user=username password = **** host='localhost'")
cur = conn.cursor()
Here I tried a straight execute and a mogrify.
cur.mogrify("""INSERT INTO database (date, id) VALUES (now(), %s );""" % (user,))
cur.execute
I also tried this instead of the mogrify
cur.execute("""INSERT INTO database (date, id) VALUES (now(), %s );""" % (user,))
I can query a select statement but insert doesn't seem to be working.
commitafter insert?