[FX.php List] [TIP] - use groupsize = 0 to speed summaries
Andy Gaunt
andy at fmpug.com
Fri Nov 17 10:57:56 MST 2006
Dan,
Nice tip.
You should swing by http://www.fmpug.com/websnippets.php and add it. This is
a new service we are offering to all visitors and members of FMPug.com
The idea is to provide a resource where you can get useful code snippets
that are suggested over and over on so many mailing lists. It is not
designed to replace a mailing list such as this one and I hope this is not
seen as an attempt to replace but more of an addition to this great
resource.
Stop on by today and let us know your thoughts.
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 DC
Sent: Friday, November 17, 2006 12:50 PM
To: FX.php Discussion List
Subject: [FX.php List] [TIP] - use groupsize = 0 to speed summaries
Here's a tip for super-speeding up your code... when all you need is
a count for a found set you can send zero as the groupsize parameter
and speed up processing. this works because FX won't have any record
data to parse from XML into arrays.
NOTE: this **only** applies to FX code where you want to get the
foundCount only - for instance, in a summary. the data array item
will be empty.
// retrieve zero records when all you need is the found count
$fx_object = new FX ($IP, $port);
// put zero in the groupsize parameter
$fx_object->SetDBData($db, $layout, 0);
$res = $fx_object -> FMFind();
$count = $res['foundCount'];
echo $count;
i use this technique to build summary tables where i don't care what
the actual data is; i just want the counts.
enjoy.
dan
_______________________________________________
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