Posted by Captain Paralytic on 11/03/06 12:46
Tyrone Slothrop wrote:
> I need to write a query which will find those records which have the
> closest values to a zip code posted through a form. The values may be
> greater than or less than the requested value.
>
> I had written a function which accomplishes this which uses multiple
> queries many years ago. As I am now revising the site in a major
> redesign, the thought occurred to me that there must be a better way.
>
> Any ideas?
You haven't told us whether you want to limit the output by number of
records or by distance from the target.
But check out the posts found by ths search:
http://groups.google.co.uk/group/comp.databases.mysql/search?group=comp.databases.mysql&q=abs&qt_g=1
[Back to original message]
|