P Pol57 Member Jul 14, 2020 #1 I'm already limiting by page, but can I also limit the code below so the total results is limited to 1000? Code: $posts = $postList->limitByPage($page, $perPage)->fetch();
I'm already limiting by page, but can I also limit the code below so the total results is limited to 1000? Code: $posts = $postList->limitByPage($page, $perPage)->fetch();
P Pol57 Member Jul 15, 2020 #3 au lait said: Code: ->limit() Click to expand... Thanks, but I've tried that (in two different places) and it appears to make no change. Am I doing something very silly wrong? Code: $postRepo = $this->getPostRepo(); $postList = $postRepo->finder('XF:Post'); $postList ->whereSql("xf_post.thread_id IN ($sthreadid)") ->limit(8); $posts = $postList->limit(10)->fetch(); Upvote 0 Downvote
au lait said: Code: ->limit() Click to expand... Thanks, but I've tried that (in two different places) and it appears to make no change. Am I doing something very silly wrong? Code: $postRepo = $this->getPostRepo(); $postList = $postRepo->finder('XF:Post'); $postList ->whereSql("xf_post.thread_id IN ($sthreadid)") ->limit(8); $posts = $postList->limit(10)->fetch();