diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 90f60bea..5079def8 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -763,8 +763,21 @@ class MarketController extends BaseController { ':token_type' => $type, ) ); + $counts = $conn->execQuery( + 'SELECT count(*) as count 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), + array( + ':token_type' => $type, + ) + ); - $total = count($rows); + $total = $counts[0]['count']; $page_end = $start + $page_size; if ($page_end > $total) { $page_end = $total; @@ -789,7 +802,7 @@ class MarketController extends BaseController { } $this->_rspData(array( - "total" => count($rows), + "total" => $total, "start" => $start, "page_size" => $page_size, 'nfts' => $nfts, @@ -837,7 +850,7 @@ class MarketController extends BaseController { } $this->_rspData(array( - "total" => count($rows), + "total" => $total, "start" => $start, "page_size" => $page_size, 'nfts' => $nfts,