pricelist
parent
a0f114ac0e
commit
9ebe4839c0
Binary file not shown.
@ -0,0 +1,11 @@
|
|||||||
|
from cs50 import sql
|
||||||
|
|
||||||
|
db = sql.SQL("sqlite:///pricelist.db")
|
||||||
|
partnumber = input("Partnumber?: ")
|
||||||
|
count = db.execute("SELECT COUNT(*) FROM pricelist WHERE Partnumber = ?;", partnumber)
|
||||||
|
rows = db.execute("SELECT * FROM pricelist WHERE Partnumber = ?;", partnumber)
|
||||||
|
|
||||||
|
for row in rows:
|
||||||
|
print(f"{row['Partnumber']} | {row['Option']} | {row['Description']}")
|
||||||
|
|
||||||
|
print(f"Found {count} products.")
|
||||||
Loading…
Reference in New Issue