Commit 371ea1de authored by ZZH's avatar ZZH

fix news search add conditions 2024-03-6

parent 10a425d8
...@@ -100,7 +100,7 @@ async def load_news_pages(params): ...@@ -100,7 +100,7 @@ async def load_news_pages(params):
conds.append(f"title LIKE %{se_title}%") conds.append(f"title LIKE %{se_title}%")
if len(conds) > 1: if len(conds) > 1:
conds_str = "WHERE" + " AND ".join(conds) conds_str = "WHERE " + " AND ".join(conds)
elif len(conds) == 1: elif len(conds) == 1:
conds_str = f"WHERE {conds[0]} " conds_str = f"WHERE {conds[0]} "
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment