[FX.php List] Record Count after the fact

Andy Gaunt andy at fmpug.com
Thu Feb 15 09:25:54 MST 2007


Jonathan,

Rather than do a new page, can you do your for loop outside the HTML first
(writing everything to a new variable) then echoing this to your page once
completed?. If so then you could increment a counter variable when the
record matches your criteria ( $counter++; ) and then echo this out before
you echo out your content from the loop.

Andy Gaunt
Office: 321.206.3658
Mobile: 407.810.4722
andy at fmpug.com
http://www.fmpug.com    

2006 FileMaker Excellence Award Winner
Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award

For chapter locations, dates & times please visit the website at
http://www.fmpug.com If you can make it to a meeting, please RSVP at
http://www.fmpug.com/rsvp.php


-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan Schwartz
Sent: Thursday, February 15, 2007 11:21 AM
To: FX.php Discussion List
Subject: [FX.php List] Record Count after the fact

Hi Folks,

I have a search with multiple criteria where I am using the technique 
previously sugegsted here: do the primary search to FMP and then have 
php loop through the records with a secondary criteria to arrive at 
the final record set.  Those records are then displayed with "for 
each."

The problem I have is reporting the number of records found which 
displays on the page above (before) the display of the records 
themselves.  I don't know the size of the record set until after the 
"for each" loop is finished.

I suppose that I can execute the search on another page and then 
include the results on the display page, complete with record count.

Does that sound right, or is there a better way?

Jonathan



-- 

Jonathan Schwartz
FileMaker 8 Certified  Developer
Associate Member, FileMaker Solutions Alliance
Schwartz & Company
jonathan at eschwartz.com
http://www.eschwartz.com
http://www.exit445.com
415-381-1852

_______________________________________________
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