From 863efdd84c5e28af23d1e215337215165ab67d05 Mon Sep 17 00:00:00 2001 From: W1CDN Date: Sat, 13 May 2023 11:14:21 -0500 Subject: [PATCH] Use LIKE instead of =. --- api_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_app.py b/api_app.py index c854482..6ed1429 100644 --- a/api_app.py +++ b/api_app.py @@ -124,7 +124,7 @@ def select_frames(conn, n, from_, url_params): field_where = dictfilt(url_params, db_fields) # Then loop through fields to create query parts # From https://stackoverflow.com/a/73512269/2152245 - field_where_str = ' AND '.join([f'"{k}" = \'{v}\'' for k,v in field_where.items()]) + field_where_str = ' AND '.join([f'"{k}" LIKE \'{v}\'' for k,v in field_where.items()]) cur = conn.cursor() # Workaround to deal with missing value in WHERE