Hoofdletters update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
The general node file includes the database connecting and a node connection class.
|
||||
This is done so the files don't go back and forth with the db connection, this otherwise would have caused problems.
|
||||
```py
|
||||
#importing a database library to connect to the database.
|
||||
#Importing a database library to connect to the database.
|
||||
import mysql.connector
|
||||
|
||||
def dbLogin():
|
||||
@@ -15,7 +15,7 @@ def dbLogin():
|
||||
return mydb
|
||||
# A general class which acts as a database connector and a node identifyer
|
||||
class Node():
|
||||
|
||||
|
||||
def __init__(self, macAdress):
|
||||
self.macAdress = macAdress
|
||||
self.id = None
|
||||
@@ -26,7 +26,7 @@ class Node():
|
||||
cursor = mydb.cursor()
|
||||
cursor.execute("""SELECT nodeID FROM Node WHERE MAC = %s""", id)
|
||||
data = cursor.fetchall()
|
||||
#again go along all tuple items. and asign them to the ID
|
||||
#Again go along all tuple items. and asign them to the ID
|
||||
for tuples in data:
|
||||
for item in tuples:
|
||||
self.id = item
|
||||
|
Reference in New Issue
Block a user