Skip to content

Commit

Permalink
Update query (#1377)
Browse files Browse the repository at this point in the history
  • Loading branch information
otseng authored Jun 30, 2023
1 parent 09b81ef commit 3be03e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/ToolsSqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def getRawContent(self, entry):
def getReverseContent(self, entry):
search = "%{0}%".format(entry)
query = TextUtil.getQueryPrefix()
query += "SELECT Topic, Definition FROM Lexicon WHERE Definition LIKE ?"
query += "SELECT Topic, Definition FROM Lexicon WHERE Definition LIKE ? ORDER BY Topic"
self.cursor.execute(query, (search,))
records = self.cursor.fetchall()
contentText = """<h2>{0}</h2>""".format(self.module)
Expand All @@ -961,7 +961,7 @@ def getReverseContent(self, entry):
def getRawReverseContent(self, entry):
try:
search = "%{0}%".format(entry)
query = "SELECT Topic, Definition FROM Lexicon WHERE Definition LIKE ?"
query = "SELECT Topic, Definition FROM Lexicon WHERE Definition LIKE ? ORDER BY Topic"
self.cursor.execute(query, (search,))
return self.cursor.fetchall()
except Exception as ex:
Expand Down

0 comments on commit 3be03e3

Please sign in to comment.