From: Agnibho Mondal Date: Sun, 23 May 2021 18:03:06 +0000 (+0530) Subject: Sorted medicines X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=cc30e024e787dedc1c4251008c8b7b2372637fb9;p=simpleipd.git Sorted medicines --- diff --git a/lib/db.php b/lib/db.php index 8a02ae5..f0f0489 100644 --- a/lib/db.php +++ b/lib/db.php @@ -250,7 +250,7 @@ class DB extends SQLite3 { function getDrugs($pid){ global $log; if(!checkAccess("treatment", "dbGet")) return false; - $stmt=$this->prepare("SELECT rowid,* FROM treatment WHERE pid=:pid;"); + $stmt=$this->prepare("SELECT rowid,* FROM treatment WHERE pid=:pid ORDER BY omit,start;"); $stmt->bindValue(":pid", $pid); $result=$stmt->execute(); return($result);