Improve LIKE query

Signed-off-by: Etzelia <etzelia@hotmail.com>
develop
Etzelia 2019-08-20 11:32:54 -05:00
parent 25829377a1
commit 47c0a7c605
No known key found for this signature in database
GPG Key ID: 3CAEB74806C4ADE5
1 changed files with 1 additions and 1 deletions

2
gui.py
View File

@ -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"]]