From 2c703340003a010e25a79589bf5e3cea55844482 Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Fri, 12 Jan 2024 01:36:01 +0530 Subject: [PATCH] Sort report by inventory --- vaccination.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaccination.py b/vaccination.py index ec3a17e..68ed6ed 100644 --- a/vaccination.py +++ b/vaccination.py @@ -67,7 +67,7 @@ def list_by_inventory(cursor, iid): def list_by_date(cursor, date): try: - result=cursor.execute("SELECT * FROM vaccination LEFT JOIN inventory ON vaccination.iid=inventory.iid LEFT JOIN patients ON vaccination.pid=patients.pid WHERE date LIKE ?", (date+"%",)) + result=cursor.execute("SELECT * FROM vaccination LEFT JOIN inventory ON vaccination.iid=inventory.iid LEFT JOIN patients ON vaccination.pid=patients.pid WHERE date LIKE ? ORDER BY vaccination.iid", (date+"%",)) if(cursor.rowcount==0): return (False, "Record not found.") else: -- 2.39.5