diff --git a/main.py b/main.py index 67fb91b..f489f62 100644 --- a/main.py +++ b/main.py @@ -36,13 +36,13 @@ def root(): # 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') #Delete LIMIT 1 So all pictures show item_data = cur.fetchall() # Show an error instead of the categories category_data = [(-1,"Error")] # Show all categories - #cur.execute('SELECT categoryId, name FROM categories') - #category_data = cur.fetchall() + cur.execute('SELECT categoryId, name FROM categories') + category_data = cur.fetchall() item_data = parse(item_data) return render_template('home.html', itemData=item_data, loggedIn=logged_in, firstName=first_name, noOfItems=no_of_items, categoryData=category_data)