February 6, 200521 yr My question has to do with foundCount and related fields. I know that if I want to say: "The total number of records that match this search is XXXX" foundCount will provide me with the number XXXX. However, I can't figure out how to get fx.php to return the number of records displayed on a certain page along with foundCount. For example, I want to say: Shown below are records number 1 through 20 of 236 records. (236 being my fictional foundCount number) and successive pages like this ... Shown below are records number 21 through 40 of 236 records. How do I do this? I can show you the code from my pages if that will help. Everything else on my pages works just great. It serves up 20 products per page. It finds all my products exactly as I want it to. Thank you! -Lynn, the FX.php newbie
February 7, 200521 yr I've seen people do two finds to achieve this. The first find has a "-max" of "All", this becomes the total records. The second find is used for the real job of paging. Good Luck. Garry
April 12, 200520 yr I use the following code with much success: <p>Displaying records <?php echo ($skip+1) . " to " . min(($skip+$groupSize), $ReturnedData['foundCount']) . " of " . $ReturnedData['foundCount']; ?></p> This relies on having the $groupSize and $skip variables set, but that's pretty standard practise using FX anyway. Good luck! Kevin
April 26, 200520 yr kfutter's code is nice and clean and helped me. Thanks for posting! Shannon -=-=-
Create an account or sign in to comment