Fixed to work with clientId

This commit is contained in:
rain
2023-05-25 14:09:01 -05:00
parent f8700247a3
commit 9be1edf3cd
+1 -1
View File
@@ -39,7 +39,7 @@ def get_db_cols(conn, table):
def query_db(conn, columns, table, ports, clientId):
""" Create a table in the database """
queryPorts = ' AND ports LIKE '.join(['"%|'+str(port)+'|%"' for port in ports])
query = f"SELECT {columns} from {table} WHERE clientId LIKE {clientId} and ports LIKE {queryPorts}"
query = f"SELECT {columns} from {table} WHERE clientId LIKE '{clientId}' and ports LIKE {queryPorts}"
try:
c = conn.cursor()
c.execute(query)