[FX.php List] Problems with linkNext/linkPrevious

Bob Patin bob at patin.com
Tue Feb 28 18:20:15 MST 2006


Craig,

Thanks so much for sending this; I poked around with it until I  
figured out how you were doing things, and it's working great... it's  
a shame that I couldn't ever find out how to get linkNext working! :)

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com

   CONTACT US VIA SKYPE:
      USERNAME: longtermsolutions

   CONTACT US VIA INSTANT MESSAGING:
      AIM or iChat: longterm1954
      Yahoo: longterm_solutions
      MSN: bob at patin.com
      ICQ: 159333060


On Feb 27, 2006, at 7:11 PM, Craig Forster wrote:

> Hi Bob.
>
> List is all good. There is an defualt on this list to 'don't send  
> posts back
> to yourself' which means it can get quite confusing.... Eg Did this  
> send?
>
> Here is some code that is working on my site that you might find  
> helpful to
> get your links working (note I use form buttons, not links, so my  
> forms are
> POSTs not GETs)
>
> ## THE BIT THAT GETS THE RESULTS FROM FX.PHP
>
> $keyWord=$_POST['keyWord'];
> $sessCoName=$_SESSION["sessCoName"]; //Just a security tag I use
> $skipSize=$_POST['skip'];
> $type=$_POST['type'];
> $groupSize=$_POST['Searchmax'];
>
>  if($type=='next'){ $skipSize=$skipSize + $groupSize; }
>  if($type=='prev'){ $skipSize=$skipSize - $groupSize; }
>
>
> $skins=new FX($serverIP,$webCompanionPort,'FMPro7');
> $skins->SetDBData($DBase,$DBLayout,$groupSize);
> $skins->SetDBUserPass($DB_User,$DB_Pass);
> $skins->AddDBParam('Description',$keyWord, 'cn');
> $skins->AddDBParam('CompanyFor',$sessCoName, 'eq');
> $skins->FMSkipRecords($skipSize); // BOB LOOK AT THIS LINE ESPECIALLY
> $skinResult=$skins->FMFind();
> print_r($skinResult);
>
>
> ## THE NEXT RESULTS BUTTON
>
> <? if($skipSize+$groupSize >= $skinFound){ // DO Nothing - don't show
>                                            // the button as not enough
>                                            // records are found
> } else{ ?>
>
> <form method='POST' action='index.php?area=skinSearchResults'>
> <input type='hidden' name='type' value='next'>
> <input type='hidden' name='skip' value='<? echo $skipSize; ?>'>
> <input type='hidden' name='Searchmax' value='<? echo $groupSize; ?>'>
> <input type='hidden' name='keyWord' value='<? echo $keyWord; ?>'>
> <input type='submit' name='submit' value='Next &gt;'>
> </form>
>
> <? } ?>
>
> HTH
>
> Craig
>
>
> On 27/2/06 7:16 AM, "Bob Patin" <bob at patin.com> wrote:
>
>> I sent a message about this earlier, but I never received a copy of
>> it, nor am I getting any other messages... is this list not
>> functional right now?
>>
>> I'm trying to make my linkNext & linkPrevious code work, but am not
>> getting very far. Here's what I've got in my page:
>>
>> In the top of the page, I have this:
>>
>> $search=new FX($serverIP,$webCompanionPort);
>> $search->SetDBData('file.fp7','layout',20);
>> $search->SetDBPassword('password','username');
>> $search->AddDBparam('model_no','=='.$model);
>> if (isset($_GET['skip']) && $_GET['skip'] > 0) {
>>       $search->FMSkipRecords($_GET['skip']);
>> }
>> $searchResult=$search->FMFind();
>>
>> -----
>>
>> Then, I have this below my table:
>>
>> <?php
>> if (strlen($searchResult['linkPrevious']) < 1) {
>> } else {
>> echo '<a href="'.$searchResult['linkPrevious']."\" class=\"bbody
>> \"><< Previous Results</a>\n";
>> }
>> ?>
>>
>> I'm sure my error is tiny, but I can't find it. When I click on my
>> NEXT or PREVIOUS links, I get no records found...
>>
>> Any help would be greatly appreciated; thanks,
>>
>> Bob Patin
>> Longterm Solutions
>> bob at longtermsolutions.com
>> 615-333-6858
>> http://www.longtermsolutions.com
>>
>>    CONTACT US VIA SKYPE:
>>       USERNAME: longtermsolutions
>>
>>    CONTACT US VIA INSTANT MESSAGING:
>>       AIM or iChat: longterm1954
>>       Yahoo: longterm_solutions
>>       MSN: bob at patin.com
>>       ICQ: 159333060
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list