Commit
·
3af420c
1
Parent(s):
9180c63
Update app.py
Browse files
app.py
CHANGED
@@ -54,11 +54,10 @@ def main():
|
|
54 |
|
55 |
elif option=="Update":
|
56 |
st.subheader("Update a Record")
|
57 |
-
|
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
|
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()
|