Newbies johndlz Posted January 29, 2008 Newbies Posted January 29, 2008 Hi im new to filemaker.PHP can somebody give me an idea on how to do page navigation, i want to display 1 item per page then if next is click it will display the next item. Hope somebody can give me an idea about this.... this is the function that i used but its not totally working but maybe this will help.... function getStatusLinks($ur, $rs, $skp, $max) { $links = array ( 'first' => 'First', 'prev' => 'Prev', 'records' => array ( 'rangestart' => 0, 'rangeend' => 0, 'foundcount' => 0 ), 'next' => 'Next', 'last' => 'Last' ); $fetchcount = $rs->getFetchCount(); $foundcount = $rs->getFoundSetCount(); $total = $rs->getTableRecordCount(); if ($total == 0 || $fetchcount == 0) { return $links; } else { if ($fetchcount > 0) { if ($skp > 0) { $links['first'] = 'First'; if ($skp > $max) { $prevskip = $skp - $max; $links['prev'] = 'Prev'; } } if ($foundcount - $skp > $max) { $nextskip = $skp + $max; $links['next'] = 'Next'; $lastskip = $foundcount - $max; $links['last'] = 'Last'; } $links['records']['rangestart'] = max($skp, 1); $links['records']['rangeend'] = min($foundcount + $skp, $fetchcount + $skp); $links['records']['foundcount'] = $foundcount; } } return $links; } Thanks in advance john
Newbies johndlz Posted January 30, 2008 Author Newbies Posted January 30, 2008 :) nobody know's this question..... well i already figure out the problem thanks anyways to all who viewed this post.
Recommended Posts
This topic is 6402 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now