[FX.php List] linkNext seems to "lose" the previous find parameters

Micah Desjardins Micah.Desjardins at asu.edu
Fri Feb 25 08:28:53 MST 2005


//Here's what I'm including:

include_once('FX.php');
include_once('server_data.php');
include_once('FMErrors.php');

//So.. I start a new Query...

$mynewsearch = new FX($serverIP,$webCompanionPort);
// I limit my search returns to 10....
$mynewsearch->setDBData('mydb.fp7','main',10);
// I load up a bunch of search paremeters
$newsongsearch->SetDBPassword('*********,'username');
$newsongsearch->AddDBParam('-lop', 'or');
$newsongsearch->AddSortParam('Composer','ascend', 1);
$newsongsearch->AddSortParam('Instrument','ascend', 2);
$newsongsearch->AddDBParam('Composer',$Composer,'cn');
$newsongsearch->AddDBParam('TitleFirstLine',$TitleFirstLine,'cn');
$newsongsearch->AddDBParam('TempoKeyMeter',$TempoKeyMeter,'cn');
$newsongsearch->AddDBParam('Poet',$Poet,'cn');
$newsongsearch->AddDBParam('VoiceRange',$VoiceRange,'cn');
$newsongsearch->AddDBParam('Instrument',$Instrument,'cn');
$newsongsearch->AddDBParam('PublisherCycle',$PublisherCycle,'cn');
$newsongsearch->AddDBParam('Comments',$Comments,'cn');
// Execute the find...
$searchResult = $mynewsearch->FMFind();
// Found count ends up as 89.. Error code is 0

Found count: <?php echo $searchResult['foundCount']?>  Error Code: <?php echo $searchResult['errorCode']?>
<!--Some HTML Table code starts here-->
// This is to the best of my knowledge exactly how this is called in the documentation and in the example file...
<?php
if (strlen ($searchResult['linkNext']) <1) {

echo "None\n";
} else {
echo '<a href=" '. $searchResult['linkNext'] . "\" >Next 10 Records</a>\n";
}
?>

// The problem is when I examine this linkNext URL pointer, it just adds ?skip=10& to the current php page URL.
// Actually USING that URL.. you end up with a FINDALL on the database (6,072 records instead of 89) and 
// It keeps the SORT (Composer) but starts with the FIRST record, not the 10th. (It does however display only 10)

// So someone help me out here... what exactly am I doing wrong with my linkNext?
// Thanks in Advance for any advice and suggestions.

//Micah DesJardins


More information about the FX.php_List mailing list