Initial commit: 商品售卖网站
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('backend/sale.db')
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT id, name, price FROM products ORDER BY id DESC LIMIT 25")
|
||||
print("Products in database:")
|
||||
for row in cursor.fetchall():
|
||||
print(f" ID: {row[0]}, Name: {row[1]}, Price: {row[2]}")
|
||||
Reference in New Issue
Block a user