Sort the results of file by insert date
This commit is contained in:
@@ -41,7 +41,7 @@ async def read_all_files():
|
|||||||
async def read_all_files_by_patient(patientID: int):
|
async def read_all_files_by_patient(patientID: int):
|
||||||
db = dbConnection.dbConnect()
|
db = dbConnection.dbConnect()
|
||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
query = "SELECT * FROM patient_files where patient_id = %s"
|
query = "SELECT * FROM patient_files where patient_id = %s ORDER BY insert_date DESC"
|
||||||
cursor.execute(query, (patientID,))
|
cursor.execute(query, (patientID,))
|
||||||
items = [
|
items = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user