[FX.php List] Sorting With PHP
Leo R. Lundgren
leo at finalresort.org
Thu Aug 14 10:25:34 MDT 2008
My guess is since the standard array functions in PHP cannot possibly
know the structure of your result sets, you'll have to build your own
sorting algorithm. You could either loop the current array and place
the records in it in a new, sorted, array by some hashing on the key
values in the new array, or you could perhaps use one of the standard
sorting functions that takes a callback function.
14 aug 2008 kl. 18.14 skrev Tanner Ellen:
> I was wondering if there was any way to sort a record set with
> straight PHP once the results are already returned rather than
> using the FX function AddSortParam. Basically I want to find some
> records have php perform a calculation on a field and then sort the
> records based on the results of that calculation. I know I could
> do the calculation in filemaker but this is based on the user who
> is logged in to the site so it would be very slow and add quite a
> bit of stress to my FileMaker server. I have looked at the asort
> funciton but I might be missing something because I couldn't get it
> to re-order the results of my found set. Any thoughts?
>
> Thanks
>
> -Tanner
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20080814/c336a77a/attachment.html
More information about the FX.php_List
mailing list