JBChris
06-15-2005, 10:45 PM
Can anyone help?
Here's my problem: I am working on a OOP module for sorting a mysql result set by distance from a specified zip code. Say I query the database like this: "SELECT id, name, city, state, zip, phone FROM contacts WHERE city= 'Dallas'". I then pass this to the class. For each result returned I used an "array_push" and added a ziplocateddistance to each result array.
Here's what I need help with: I need to sort the array by the ziplocateddistance. That's all! I just need some help. There's no php function that will do this to my knowledge. If anyone can help I would greatly appreciate it! I need to finish this by Saturday.
Thanks,
Josh
Here's my problem: I am working on a OOP module for sorting a mysql result set by distance from a specified zip code. Say I query the database like this: "SELECT id, name, city, state, zip, phone FROM contacts WHERE city= 'Dallas'". I then pass this to the class. For each result returned I used an "array_push" and added a ziplocateddistance to each result array.
Here's what I need help with: I need to sort the array by the ziplocateddistance. That's all! I just need some help. There's no php function that will do this to my knowledge. If anyone can help I would greatly appreciate it! I need to finish this by Saturday.
Thanks,
Josh