Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6134 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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
Posted

:) nobody know's this question..... well i already figure out the problem thanks anyways to all who viewed this post.

This topic is 6134 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.