Skip to content
Snippets Groups Projects
Commit 4f131eb2 authored by Bouchaira Neirouz's avatar Bouchaira Neirouz
Browse files

ggg

parent ec28fd6d
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ with tab1: ...@@ -14,7 +14,7 @@ with tab1:
# Add code for "Suivi Employés" page here # Add code for "Suivi Employés" page here
st.write("Page de suivi des employés") st.write("Page de suivi des employés")
# Connect to the database # Connect to the database
with sqlite3.connect(r'donnees\company.db') as conn: # Use raw string with sqlite3.connect(r'C:\Users\neiro\Documents\+\GitHub\sgbd-usine\donnees\company.db') as conn: # Use raw string
cursor = conn.cursor() cursor = conn.cursor()
# Fetch all employee records # Fetch all employee records
cursor.execute("SELECT * FROM EMPLOYE") cursor.execute("SELECT * FROM EMPLOYE")
...@@ -24,6 +24,7 @@ with tab1: ...@@ -24,6 +24,7 @@ with tab1:
# Display the DataFrame with Streamlit # Display the DataFrame with Streamlit
st.dataframe(df) st.dataframe(df)
st.stop() st.stop()
conn.close()
with tab2: with tab2:
st.title("Création de compte employé") st.title("Création de compte employé")
...@@ -59,8 +60,7 @@ with tab2: ...@@ -59,8 +60,7 @@ with tab2:
# Submit button # Submit button
if st.button("Create Account"): if st.button("Create Account"):
# Connect to the database # Connect to the database
with sqlite3.connect('donnees\company.db') as conn: conn=sqlite3.connect(r'C:\Users\neiro\Documents\+\GitHub\sgbd-usine\donnees\company.db')
cursor = conn.cursor()
# Check if the employee already exists # Check if the employee already exists
cursor.execute(""" cursor.execute("""
SELECT NUMERO_EMPLOYE FROM EMPLOYE SELECT NUMERO_EMPLOYE FROM EMPLOYE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment