summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdDb.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mmd/MmdDb.py')
-rw-r--r--tools/mmd/MmdDb.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/mmd/MmdDb.py b/tools/mmd/MmdDb.py
index 1db8f17..7d915cf 100644
--- a/tools/mmd/MmdDb.py
+++ b/tools/mmd/MmdDb.py
@@ -101,6 +101,18 @@ class Db:
self.cursor.execute ('SELECT * FROM location WHERE user_id=?', (user_id,))
return self.cursor.fetchone ()
+ def locationListByUserId (self, user_id):
+ self.cursor.execute ('SELECT id FROM location WHERE user_id=?', (user_id,))
+ return self.cursor.fetchall ()
+
+ def locationFindId (self, location_id):
+ self.cursor.execute ('SELECT * FROM location WHERE id=?', (location_id,))
+ return self.cursor.fetchone ()
+
+ def locationDeleteId (self, location_id):
+ self.cursor.execute ('DELETE FROM location WHERE id=?', (location_id,))
+ self.conn.commit ()
+
def close (self):
self.cursor.close ()
self.conn.close ()