sort poducts
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user