[FX.php List] Showing last related record - sort in FM or just PHP?

Steve Winter steve at bluecrocodile.co.nz
Mon Oct 16 18:16:32 MDT 2006


Hi Joel,

> > my best advice, sort in fmp in the relationship definition.
> 
> but if the WPE will spit back *all* related records regardless,  
> wouldn't it be faster to have FM return all the data unsorted and do  
> the sorting within PHP?

Probably... if you were actually going to do some form of sort, then it
would most likely be quicker to do it in php. If it was a sort order
applied to the relationship I don't think it will make any difference...
 
> >  if you want to get really trick and you are sure you only ever  
> > need one (most recent) record you can make a calc field that just  
> > returns the last record. that way PHP doesn't have to transform a  
> > bunch of XML data that you'll never use.
> 
> I've heard it's optimal to not have calc fields on the web layout if  
> possible (for speed), but do you think that in this case it could  
> still be faster than returning all related records?

Personally I think this would be the slowest option... unstored
calculation  fields are going to be slower for the wpe to process than all
of the related records (IMHO)

Cheers
Steve




More information about the FX.php_List mailing list