| 407 | | ## SELECT last_insert_rowid() |
|---|
| 408 | | c.execute('''SELECT LAST_INSERT_ID()''') |
|---|
| 409 | | return c.fetchall()[0][0] |
|---|
| 410 | | #return self.db().db.sqlite_last_insert_rowid() |
|---|
| | 407 | ## TODO: add database-specific methods to get the last inserted ticket's id... |
|---|
| | 408 | ## PostgreSQL: |
|---|
| | 409 | # c.execute('''SELECT currval("ticket_id_seq")''') |
|---|
| | 410 | ## SQLite: |
|---|
| | 411 | # c.execute('''SELECT last_insert_rowid()''') |
|---|
| | 412 | ## MySQL: |
|---|
| | 413 | # c.execute('''SELECT LAST_INSERT_ID()''') |
|---|
| | 414 | # Oh, Trac db abstraction layer already has a function for this... |
|---|
| | 415 | return self.db().get_last_id(c,'ticket') |
|---|