equal
deleted
inserted
replaced
94 def _save(self): |
94 def _save(self): |
95 """Save the new transport in the database.""" |
95 """Save the new transport in the database.""" |
96 dbc = self._dbh.cursor() |
96 dbc = self._dbh.cursor() |
97 dbc.execute("SELECT nextval('transport_id')") |
97 dbc.execute("SELECT nextval('transport_id')") |
98 self._tid = dbc.fetchone()[0] |
98 self._tid = dbc.fetchone()[0] |
99 dbc.execute('INSERT INTO transport VALUES (%s, %s)', (self._tid, |
99 dbc.execute('INSERT INTO transport (tid, transport) VALUES (%s, %s)', |
100 self._transport)) |
100 (self._tid, self._transport)) |
101 self._dbh.commit() |
101 self._dbh.commit() |
102 dbc.close() |
102 dbc.close() |
103 |
103 |
104 del _ |
104 del _ |