[FX.php List] LinkNext/LinkPrevious and FMFind

Kim Hawksworth hawksworth-2 at medctr.osu.edu
Thu Oct 28 12:35:21 MDT 2004


I sent a message to the list back on the 19th of this month regarding a
problem with LinkNext/LinkPrevious from the FMFind() function.  It
didn't get any responses, so I thought I'd try again...

As previously stated, I can get linkNext and LinkPrevious to work just
fine from the FMFindAll(); function,  but from an FMFind(); function the
initial set of records returned has one more record than what was
specified by the skip number (in others words if the skip # is set to
25, it returns 26 records).  Clicking the LinkNext button finds no more
matching records in the database instead of the next set of 25.
LinkPrevious also gives the same message instead of displaying the
previous 25 records. I intiallize the skip number with the following
code:

if (isset($_GET['skip'])) {
    $currentSkip = $_GET['skip']; 
} else {
    $currentSkip = 0;
} 

$resident_search->FMSkipRecords($currentSkip);

The linkNext button uses the following code:

<?php
if (strlen($search_results['linkNext']) <1) {
echo "";
		
}else{
		
?>
		
<a href="<?php echo $search_results['linkNext'] ?>"><b>Next
Results</b></a> <img src="images/stpl_arr.gif" border="0"
align="middle">
		
<?php
}
?>

Like I said, this works fine with FMFindAll.  Is there something else I
need to do to get this to work with the FMFind(); function?

Thanks for your help.

--Kim





Kim David Hawksworth, R.Ph., Web Manager
The Ohio State University Medical Center
Department of Pharmacy


More information about the FX.php_List mailing list