Commit c9d745c1d277863fa7e3f5a019b0777d7928742a

Authored by soochanlee ago
1 parent 7ef4b6720d
Exists in master

adding email search

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

project/project/controller/maria_db.py View file @ c9d745c
... ... @@ -26,7 +26,7 @@
26 26  
27 27 def GetUserByName(self, name):
28 28 data = []
29   - query = "select * from USER where name like '%"+name+"%';"
  29 + query = "select * from USER where name like '%"+name+"%' or email = '"+name+"';"
30 30 self.cursor.execute(query)
31 31 rows = self.cursor.fetchall()
32 32  
project/project/templates/user.html View file @ c9d745c
... ... @@ -29,7 +29,7 @@
29 29 <div class="container">
30 30 <div class="week_type">
31 31 <form id="post_form" name="post_form" action="/" method="post">
32   - <b>ID : </b><input id="user_id" class="user_id" name="user_id" value="{{ search }}"></input>
  32 + <b>ID or email : </b><input id="user_id" class="user_id" name="user_id" placeholder="ID or email" value="{{ search }}"></input>
33 33 <input class="btn btn-primary" style="height:30px;" value="검색" type="submit"/>
34 34 <input type="hidden" id="del_user" name="del_user">
35 35 <input type="hidden" id="auth" name="auth" value="{{ auth }}">