From cb0f4207861d2416723ea3e8c3c3d31226e6078d Mon Sep 17 00:00:00 2001 From: songliang Date: Fri, 16 Dec 2022 13:36:22 +0800 Subject: [PATCH] ... --- webapp/controller/MarketController.class.php | 31 ++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 5079def8..e8701379 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -749,20 +749,6 @@ class MarketController extends BaseController { $conn = myself()->_getMysql(''); - $rows = $conn->execQuery( - 'SELECT * FROM t_market_store '. - 'WHERE token_type=:token_type '. - $job_filter_fn($job_filter_array). - $lv_filter_fn($lv_filter). - $quality_filter_fn($quality_filter). - $durability_filter_fn($durability_filter). - $search_filter_fn($search_filter_array). - $order_fn($order_method, $order_asc). - 'LIMIT '.$start.','.$page_size, - array( - ':token_type' => $type, - ) - ); $counts = $conn->execQuery( 'SELECT count(*) as count FROM t_market_store '. 'WHERE token_type=:token_type '. @@ -785,11 +771,26 @@ class MarketController extends BaseController { $start = intval($start / $page_size) * $page_size; if ($start<0) $start = 0; } + + $rows = $conn->execQuery( + 'SELECT * FROM t_market_store '. + 'WHERE token_type=:token_type '. + $job_filter_fn($job_filter_array). + $lv_filter_fn($lv_filter). + $quality_filter_fn($quality_filter). + $durability_filter_fn($durability_filter). + $search_filter_fn($search_filter_array). + $order_fn($order_method, $order_asc). + 'LIMIT '.$start.','.$page_size, + array( + ':token_type' => $type, + ) + ); $nfts = array(); for ($x = $start; $x < $page_end; $x++) { - $row = $rows[$x]; + $row = $rows[$x%$page_size]; $nftDb = Nft::findNftByOwner($row['owner_address'], $row['token_id']); if (!$nftDb) { myself()->_rspErr(1, 'nft not exists');