From 9be1edf3cdb83e152d850b2c5a13817e9913893c Mon Sep 17 00:00:00 2001 From: rain Date: Thu, 25 May 2023 14:09:01 -0500 Subject: [PATCH] Fixed to work with clientId --- query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query.py b/query.py index 10998eb..dc09ded 100755 --- a/query.py +++ b/query.py @@ -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)