updated the query
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
recticel/
|
||||
py_app/recticel/
|
||||
.venv/
|
||||
py_app/app/_pycache_/
|
||||
Binary file not shown.
@@ -98,15 +98,6 @@ 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
|
||||
@@ -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
|
||||
|
||||
@@ -4,3 +4,4 @@ Werkzeug
|
||||
gunicorn
|
||||
flask-sqlalchemy
|
||||
pyodbc
|
||||
mariadb
|
||||
@@ -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!';
|
||||
|
||||
Reference in New Issue
Block a user