ect (or 2du) há 8 anos atrás
pai
commit
a5e4eac5c1
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      app.py

+ 4 - 2
app.py

@@ -990,13 +990,15 @@ def deep_search(name = None):
     else:
         div = '<ul><li>문서가 없습니다. <a class="not_thing" href="/w/' + url_pas(name) + '">바로가기</a></li></ul><hr><ul>'
 
-    curs.execute("select distinct title, case when title like ? then '제목' else '내용' end from data where title like ? or data like ? order by case when title like ? then 1 else 2 end limit ?, '50'", ['%' + name + '%', '%' + name + '%', '%' + name + '%', '%' + name + '%', str(sql_num)])
+    curs.execute("select distinct title, case when title like ? then '제목' else '내용' " + \
+                "end from data where title like ? or data like ? order by case when title like ? " + \
+                "then 1 else 2 end limit ?, '50'", ['%' + name + '%', '%' + name + '%', '%' + name + '%', '%' + name + '%', str(sql_num)])
     all_list = curs.fetchall()
     if(all_list):
         test = all_list[0][1]
         for data in all_list:
             if(data[1] != test):
-                div_plus += '<hr>'
+                div_plus += '</ul><hr><ul>'
                 test = data[1]
 
             div_plus += '<li><a href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a> (' + data[1] + ')</li>'