Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update query #1377

Merged
merged 5 commits into from
Jun 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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