mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add last_insert_id module to database
This commit is contained in:
parent
8925a0dc78
commit
7d3711bf5a
2 changed files with 7 additions and 2 deletions
|
@ -203,3 +203,9 @@ class MonitorDatabase(object):
|
|||
|
||||
# We want to know if it was an update or insert
|
||||
return trans_type
|
||||
|
||||
def last_insert_id(self):
|
||||
# Get the last insert row id
|
||||
result = self.select_single(query='SELECT last_insert_rowid() AS last_id')
|
||||
if result:
|
||||
return result.get('last_id', None)
|
Loading…
Add table
Add a link
Reference in a new issue