From ab5962fa5405558c767b26e4849ebd71b8f8b217 Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 18 Nov 2024 16:09:45 -0800 Subject: [PATCH] CNE310-5 Fix book display --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index 67fb91b..693f2a6 100644 --- a/main.py +++ b/main.py @@ -33,10 +33,8 @@ def root(): logged_in, first_name, no_of_items = get_login_details() with sqlite3.connect('database.db') as conn: cur = conn.cursor() - # Show last product added - cur.execute('SELECT productId, name, price, description, image, stock FROM products ORDER BY productId DESC LIMIT 1 ') # Show all items - #cur.execute('SELECT productId, name, price, description, image, stock FROM products LIMIT 1') + cur.execute('SELECT productId, name, price, description, image, stock FROM products ') item_data = cur.fetchall() # Show an error instead of the categories category_data = [(-1,"Error")]