Martinmd Posted December 16, 2015 Share Posted December 16, 2015 Regards, You see, I have 143 pages of data tables that I continue to add to daily with my document records, but I'd like to hide data, say on pages 1 to 140. I've tried playing around with the code and have had some wonky success, but it doesn't display data on only pages 140->forward. (I'm fine with pages 1-140 being blank and still appearing as a clickable button at the bottom of the page for selection).On a side note, there's been an issue persistent since day 1, which is that when the limit of 20 per page has passed, until there are another 5~ or so data entries, the next page button won't appear, so I'll have to go to the URL and manually change the page number to see the new page. I'm used to it at this point.This is my code for the particular data:if(isset($_GET['new documents'])){ $rows = $service->count(array('is_new'=>3)); $page = (isset($_GET['page'])) ? $page = $_GET['page'] : $page = 1; $offset = ($page - 1) * $limit; $pagination->records($rows); $pagination->records_per_page($limit); $documents = $service->findAll(array('is_new'=>3,'limit'=>$limit,'offset'=>$offset)); foreach ($documents as $d){ $sid = $d->getUserId(); $eid = $d->getDocVersion()->getuserId(); $admin[] = $sService->findOneById($sid); if(!empty($eid)){ $users[] = $eService->findOneById($eid); }else{ $users[] = ''; } } $sectionHeading = 'New'; include (ABSPATH . '/tmplt/doc/new.tmplt.php'); exit;} Any help would be appreciated!Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.