From 128bc16dcab6fc130f7ffdbd10c248d47907db2d Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 14 May 2022 10:02:12 +0800 Subject: [PATCH] 1 --- webapp/controller/RankingController.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/webapp/controller/RankingController.class.php b/webapp/controller/RankingController.class.php index a76ca3e0..db3d1660 100644 --- a/webapp/controller/RankingController.class.php +++ b/webapp/controller/RankingController.class.php @@ -16,15 +16,15 @@ class RankingController extends BaseAuthedController { $type = getReqVal('type', 0); $userList = array(); { - SqlHelper::ormSelect( - myself()->_getSelfMysql(), - 't_user', + $rows = myself()->_getSelfMysql()->execQuery( + 'SELECT * FROM t_user ' . + "LIMIT 50", array( - ), - function ($row) use(&$userList) { - array_push($userList, User::info($row)); - } + ) ); + foreach ($rows as $row) { + array_push($userList, User::info($row)); + } } $rankingList = array(); $ranked = 1;