lampongyuen commited on
Commit
8ccd9d7
·
1 Parent(s): ac44277

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -54,10 +54,10 @@ def main():
54
 
55
  elif option=="Update":
56
  st.subheader("Update a Record")
57
- search_name=st.text_input("Enter Name")
58
- new_email=st.text_input("Enter New Email")
59
  if st.button("Update"):
60
- sql="update users set email=new_email where name=search_name"
61
  # val=(name,new_email)
62
  mycursor.execute(sql)
63
  mydb.commit()
 
54
 
55
  elif option=="Update":
56
  st.subheader("Update a Record")
57
+ name=st.text_input("Enter Name")
58
+ email=st.text_input("Enter New Email")
59
  if st.button("Update"):
60
+ sql="update users set email=%s where name=%s"
61
  # val=(name,new_email)
62
  mycursor.execute(sql)
63
  mydb.commit()