updated the query

This commit is contained in:
2025-04-24 05:20:59 +03:00
parent 3ecd0e1361
commit 7404492aa9
5 changed files with 10 additions and 14 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
recticel/
py_app/recticel/
.venv/
py_app/app/_pycache_/

View File

@@ -98,16 +98,7 @@ def scan():
date = request.form.get('date')
time = request.form.get('time')
# Print the values to the terminal for debugging with single quotes
print("Values to be inserted:")
print(f"Operator Code: '{operator_code}'")
print(f"CP Code: '{cp_code}'")
print(f"OC1 Code: '{oc1_code}'")
print(f"OC2 Code: '{oc2_code}'")
print(f"Defect Code: '{defect_code}'")
print(f"Date: '{date}'")
print(f"Time: '{time}'")
try:
# Connect to the database
conn = get_db_connection()
@@ -137,7 +128,7 @@ def scan():
conn = get_db_connection()
cursor = conn.cursor()
cursor.execute("""
SELECT Id, operator_code, CP_full_code, OC1_code, OC2_code, quality_code, date, time, approved_quantity, rejected_quantity
SELECT Id, operator_code, CP_base_code, OC1_code, OC2_code, quality_code, date, time, approved_quantity, rejected_quantity
FROM scan1_orders
ORDER BY Id DESC
LIMIT 15

View File

@@ -3,4 +3,5 @@ Flask-SSLify
Werkzeug
gunicorn
flask-sqlalchemy
pyodbc
pyodbc
mariadb

View File

@@ -2,9 +2,12 @@ python3 -m venv recticel
source recticel/bin/activate
python /home/ske087/quality_recticel/py_app/run.py
sudo apt install mariadb-server mariadb-client
sudo apt-get install libmariadb-dev libmariadb-dev-compat
sudo mysql -u root -p
root password : Initaial01!
root password : Initaial01! acasa Matei@123
CREATE DATABASE trasabilitate_database;
CREATE USER 'trasabilitate'@'localhost' IDENTIFIED BY 'Initial01!';