15 lines
321 B
Python
15 lines
321 B
Python
import sqlite3
|
|
|
|
db_path = "../src/db_ntfs_info.db"
|
|
conn = sqlite3.connect(db_path)
|
|
cursor = conn.cursor()
|
|
|
|
|
|
def GetDeviceId(cursor: sqlite3.Cursor) -> int:
|
|
cursor.execute("SELECT ID FROM db_device ORDER BY ID LIMIT 1")
|
|
result = cursor.fetchone()
|
|
return result[0] if result else 0
|
|
|
|
|
|
print(GetDeviceId(cursor))
|