Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

display info related to foundCount with FX.php

Featured Replies

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

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

  • 2 months later...

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

  • 2 weeks later...

if you get fxforge from fmwebschool, it will write all that code for you ...

kfutter's code is nice and clean and helped me. Thanks for posting!

Shannon

-=-=-

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.