Re: [PHP] Sorting Recordset by a calculation between 2 Records

2003-03-18 Thread Erik Price
vernon wrote: I think that maybe I should explain the fist Zip comes from a session, here I've defined the variable. I use the caluation in the code to get the distance and then loop the recordset so that the distance is created each time the record loops through. I have taken many things from

Re: [PHP] Sorting Recordset by a calculation between 2 Records

2003-03-18 Thread Erik Price
Vernon wrote: Use the distance you've calculated as the numeric index of an array, pointing to the record that corresponds to that distance. Can you please expalin this statement? Perhaps a tutorial somewhere? I could explain it better if you could post the code that you have so far which ex

Re: [PHP] Sorting Recordset by a calculation between 2 Records

2003-03-18 Thread Vernon
> When you say "using php" I'm assuming that this means you are not doing > the calculation at the database, but rather in your PHP code. Correct. > Use the distance you've calculated as the numeric index of an array, pointing to > the record that corresponds to that distance. Can you please exp

Re: [PHP] Sorting Recordset by a calculation between 2 Records

2003-03-18 Thread Erik Price
Vernon wrote: I am calculating distances between to record's zip codes using php and have a need to sort the recordset by that value. How do I do something like this? I mean it's not a value in the table that I can use the SQL ORDER BY statement. I want to be able to have the distances closest to