From d8c6de1f2b03a09d24478076aef2f04186233bc2 Mon Sep 17 00:00:00 2001 From: Marius Robert Macamete Date: Thu, 4 Dec 2025 11:38:12 +0200 Subject: [PATCH] sort poducts --- UI_V2/dbActions/products.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI_V2/dbActions/products.py b/UI_V2/dbActions/products.py index b837822..2d98c32 100644 --- a/UI_V2/dbActions/products.py +++ b/UI_V2/dbActions/products.py @@ -69,7 +69,7 @@ class Products: with sqlite3.connect(self.db_path) as conn: cursor = conn.cursor() cursor.execute(""" - SELECT * FROM products + SELECT * FROM products ORDER BY name ASC; """) rows = cursor.fetchall() if rows: @@ -99,6 +99,7 @@ class Products: cursor.execute(""" SELECT * FROM products WHERE category_id = ? + ORDER BY name ASC; """, (category_id,)) rows = cursor.fetchall() if rows: