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

Joel Shapiro jsfmp at earthlink.net
Mon Oct 16 18:31:54 MDT 2006


Great.  Thanks Steve!

I'll plan on returning all related records (by default) and then  
sorting in php to display only the one I want.

Best,
-Joel


On Oct 16, 2006, at 5:16 PM, Steve Winter wrote:

> 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
>
>
> _______________________________________________
> 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