Hi,
You could do that... if you gave the location field a weight of, say 100, then it would eclipse anything else, and your sorts would essentially be by location and within that by other points.
The code I gave before didn't work? By adding the location field into the query string, and forcing an "and" it should have worked, albeit a bit restrictive on the searches.
Something changed in the search routines in the last release, and I think it's being worked on, since a lot of people (me included) wanted to be able to return the searches based on something other than "score" order.
I _know_ there is a way to pass extra information to the search routines. Did you check the FAQ for "search" ?? That's probably about where I left off, (and I need to catch up!!)
What didn't work in the code above?
On your form, get rid of the 'or' and 'and' options, and make the field a "hidden" field and have the value set to "and". That will force the two fields to be joined with "and" but it will also mean you can't do searches like "rain or snow" ...
It _should_ work, and is at least a temporary solution.
You should only get records that have that as a match.
Let me know what is happening, and maybe I can fix the code I gave to work right. Check the logic I gave above... and make sure your location drop down box is called query2!
------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/
You could do that... if you gave the location field a weight of, say 100, then it would eclipse anything else, and your sorts would essentially be by location and within that by other points.
The code I gave before didn't work? By adding the location field into the query string, and forcing an "and" it should have worked, albeit a bit restrictive on the searches.
Something changed in the search routines in the last release, and I think it's being worked on, since a lot of people (me included) wanted to be able to return the searches based on something other than "score" order.
I _know_ there is a way to pass extra information to the search routines. Did you check the FAQ for "search" ?? That's probably about where I left off, (and I need to catch up!!)
What didn't work in the code above?
On your form, get rid of the 'or' and 'and' options, and make the field a "hidden" field and have the value set to "and". That will force the two fields to be joined with "and" but it will also mean you can't do searches like "rain or snow" ...
It _should_ work, and is at least a temporary solution.
You should only get records that have that as a match.
Let me know what is happening, and maybe I can fix the code I gave to work right. Check the logic I gave above... and make sure your location drop down box is called query2!
------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/