[FX.php List] FMSkipRecords

Jonathan Foerster jonathan.foerster at gmail.com
Fri Mar 24 12:25:40 MST 2006


Hello!

I am trying to get the FMSkipRecords function to work.  The code  
below fails to return any records (when there should be several pages  
worth).

I have stolen much of this code, trying to get something to work  
(thanks to you, if you unwittingly contributed).  Thanks!

Jonathan Foerster

<?php
include_once('FX/FX.php');
include_once('FX/server_data.php');

$Title=$_POST['Title'];
$Author=$_POST['Author'];
$Year=$_POST['Year'];
$Department=$_POST['Department'];
$Keywords=$_POST['Keywords'];
$Advisor=$_POST['Advisor'];
$Records=$_POST['Records'];
$Sort=$_POST['Sort'];
$Classification=$_POST['Classification'];

if(isset($_POST['skip'])){ $skipSize=$_POST['skip'];}else 
{$skipSize='5';}

$search=new FX($serverIP,$webCompanionPort);
$search->SetDBData('FieldStudies.fp7','Entry', $Records);
$search->SetDBPassword($webPW,$webUN);
$search->AddDBParam('Title',$Title,$operator);
$search->AddDBParam('Author',$Author,$operator2);
$search->AddDBParam('Year',$Year,$operator3);
$search->AddDBParam('Department',$Department);
$search->AddDBParam('Description',$Keywords,$operator4);
$search->AddDBParam('Advisor',$Advisor,$operator5);
$search->AddDBParam('Type',$Classification);
$search->AddSortParam($Sort,'ascend');
$search->FMSkipRecords($skipSize);
$searchResult=$search->FMFind();
?>


<table>
<tr>
<td>
<?php
if (strlen($searchResult['linkPrevious']) < 1) {
?>
&laquo;- Previous
<?php
} else {
?>
<a href="?skip=<?php echo($skipSize) ?>"><strong>&laquo;- Previous</ 
strong></a>
<?php
}
?>
</td>
<td>
<?php
if (strlen($searchResult['linkNext']) < 1) {
?>
Next -&raquo;
<?php
} else {
?>
<a href="?skip=<?php echo($skipSize) ?>"><strong>Next -&raquo;</ 
strong></a>
<?php
}
?>
</td>
</tr>
</table>


More information about the FX.php_List mailing list