lampongyuen commited on
Commit
3af420c
·
1 Parent(s): 9180c63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -54,11 +54,10 @@ def main():
54
 
55
  elif option=="Update":
56
  st.subheader("Update a Record")
57
- id=st.number_input("Enter ID",min_value=1)
58
- name=st.text_input("Enter New Name")
59
  email=st.text_input("Enter New Email")
60
  if st.button("Update"):
61
- sql="update users set name=%s, email=%s where id =%s"
62
  val=(name,email,id)
63
  mycursor.execute(sql,val)
64
  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,email,id)
62
  mycursor.execute(sql,val)
63
  mydb.commit()