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:
# Add code for "Suivi Employés" page here
st.write("Page de suivi des employés")
# 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()
# Fetch all employee records
cursor.execute("SELECT * FROM EMPLOYE")
......@@ -24,6 +24,7 @@ with tab1:
# Display the DataFrame with Streamlit
st.dataframe(df)
st.stop()
conn.close()
with tab2:
st.title("Création de compte employé")
......@@ -59,8 +60,7 @@ with tab2:
# Submit button
if st.button("Create Account"):
# Connect to the database
with sqlite3.connect('donnees\company.db') as conn:
cursor = conn.cursor()
conn=sqlite3.connect(r'C:\Users\neiro\Documents\+\GitHub\sgbd-usine\donnees\company.db')
# Check if the employee already exists
cursor.execute("""
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