Added so you can change node information

This commit is contained in:
2024-03-21 13:22:09 +01:00
parent 09522218f3
commit 54a2eef7c5
2 changed files with 21 additions and 32 deletions

View File

@@ -10,3 +10,14 @@ def get_query(node, dataType, MAC):
else:
query = "SELECT * FROM `Measurement`"
return query
def update_query(node, name, location):
if node and name and location:
query = f"""
UPDATE Node
SET Name = '{name}', Location = '{location}'
WHERE NodeID = {node};
"""
return query