Insert into table don't work
Closed this issue · 4 comments
divid3d commented
Im trying to insert some data into table with:
cur.execute('INSERT INTO test (serial, lat, long) VALUES ({}, {}, {});'.format(1,lat,long))
but seems nothing happens. Does this library support INSERT operations?
nakagami commented
'serial' and 'long' are data type.
Please show me CREATE TABLE statement.
nakagami commented
Version 0.2.2 has released.
Fix error messages, and simple test script is added
https://github.com/nakagami/micropg/blob/master/test_micropg.py
Check it
nakagami commented
Are you execute connection.commit() after insert statement ?
Probabry you need
connection.commit()
after
cur.execute("insert into...")
divid3d commented
Thank you. Everything works fine. I didn't use conn.commit()
after cur.execute()
.