[FX.php List] Next after a Find
david weiner
1265 at lucerneblvd.org
Mon Nov 17 15:47:45 MST 2008
Hi,I'm using the following code at the top of my page and it works great for
everything except the Next link after a find returns 0 records instead of
the next results.
Is there something obvious that I'm missing? I've been poking around to find
alternate ways of doing this and haven't found anything and I've been doing
things this way for a little while and haven't noticed that it didn't work
before so I'm just sort of confused.
thanks,
David
<?
include_once('FX/FX.php');
include_once('FX/server_data.php');
define("DEBUG", false);
$Query=new FX($serverIP,$webCompanionPort,'FMPro9');
$Query->SetDBData($dbname,$layout,20);
$Query->SetDBPassword($pass,$user);
$returnCount = 20;
if (!isset($_GET['skip'])) {
$skipSize = 0;
} else {
$skipSize = $_GET['skip'];
}
$arrayName = '_' . $_SERVER["REQUEST_METHOD"];
if (isset(${$arrayName}['currentSort']) && ${$arrayName}['currentSort'] !=
'') {
$Query->AddSortParam($_GET['currentSort']);
}
if (isset(${$arrayName}['currentQuery']) && ${$arrayName}['currentQuery'] ==
'Search') {
foreach ($$arrayName as $key => $value) {
if ($key != 'currentSort' && $key != 'currentQuery') {
$Query->AddDBParam($key, $value);
}
$currentSearch .= '&' . "$key=" . urlencode($value);
}
$Query->FMSkipRecords($skipSize);
$Data = $Query->FMFind();
$d = current($Data['data']);
$n = $Data['foundCount'];
$pages = ceil(($Data['foundCount'] / $returnCount));
} else {
$currentSearch = '';
$Query->FMSkipRecords($skipSize);
$Data = $Query->FMFind();
$d = current($Data['data']);
$n = $Data['foundCount'];
$pages = ceil(($Data['foundCount'] / $returnCount));
}
?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20081117/0aac740b/attachment.html
More information about the FX.php_List
mailing list