From 47c0a7c60561c526ec57645df82671dd515c298d Mon Sep 17 00:00:00 2001 From: Etzelia Date: Tue, 20 Aug 2019 11:32:54 -0500 Subject: [PATCH] Improve LIKE query Signed-off-by: Etzelia --- gui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui.py b/gui.py index 20e2e13..01a32e7 100644 --- a/gui.py +++ b/gui.py @@ -112,7 +112,7 @@ def gui_results(form): if form.players: for player in form.players.split(","): players.append(player.strip()) - players_clause = " AND ({})".format(" OR ".join(["cu.user LIKE '%%{}%%'".format(p) for p in players])) + players_clause = " AND ({})".format(" OR ".join(["cu.user LIKE '{}%%'".format(p) for p in players])) worlds_clause = "" worlds = [world["id"] for world in form.worlds if world["checked"]]