File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class ShoppingListDao extends Dao {
2424 * @return array
2525 */
2626 public function getListsByUserId (int $ userId ) {
27- $ results = $ this ->query ("SELECT * FROM ShoppingListDetail WHERE userId = ? " , [$ userId ]);
27+ $ results = $ this ->query ("SELECT * FROM ShoppingListDetail WHERE userId = ? ORDER BY isReady DESC " , [$ userId ]);
2828 return $ this ->groupResultByListId ($ results );
2929 }
3030
@@ -34,7 +34,7 @@ public function getListsByUserId(int $userId) {
3434 * @return array
3535 */
3636 public function getListsByShopId (int $ shopId ) {
37- $ results = $ this ->query ("SELECT * FROM ShoppingListDetail WHERE shopId = ? " , [$ shopId ]);
37+ $ results = $ this ->query ("SELECT * FROM ShoppingListDetail WHERE shopId = ? ORDER BY isReady " , [$ shopId ]);
3838 return $ this ->groupResultByListId ($ results );
3939 }
4040
You can’t perform that action at this time.
0 commit comments