[FX.php List] linkNext seems to "lose" the previous find
parameters
Michael Layne
fx at 9degrees.com
Fri Feb 25 15:05:23 MST 2005
Hi,
I don't see this important line FX needs...
$query->FMSkipRecords($skipSize);
here's what I do...
if (!isset($_GET['skip'])) {
$skipSize = 0;
} else {
$skipSize = $_GET['skip'];
}
$query->SetDBData($db,$lay,$returnCount);
$query->FMSkipRecords($skipSize);
that line needs to be included, or it doesn't really know how to handle
the '$searchResult['linkNext']' I'm pretty sure that's it.
HTH,
Michael
On Feb 25, 2005, at 10:28 AM, Micah Desjardins wrote:
> //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
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
Michael Layne : 9 degrees development : www.9degrees.com :
404.226.7835
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2916 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20050225/4d4f55b0/attachment.bin
More information about the FX.php_List
mailing list