Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down