Commit
·
ac44277
1
Parent(s):
c931402
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,12 +54,12 @@ def main():
|
|
| 54 |
|
| 55 |
elif option=="Update":
|
| 56 |
st.subheader("Update a Record")
|
| 57 |
-
|
| 58 |
new_email=st.text_input("Enter New Email")
|
| 59 |
if st.button("Update"):
|
| 60 |
-
sql="update users set email
|
| 61 |
-
val=(name,new_email)
|
| 62 |
-
mycursor.execute(sql
|
| 63 |
mydb.commit()
|
| 64 |
st.success("Record Updated Successfully!!!")
|
| 65 |
|
|
|
|
| 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()
|
| 64 |
st.success("Record Updated Successfully!!!")
|
| 65 |
|