_query search in link

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 11, 2013   (RSS)

By andybarn - April 9, 2013

Hi 

I am trying to create a search link that lists all Towns "Not Equal" to the towns in the list below - this works great

<a href="listings_town_xref.php?town_query=-Javea -Benidorm -Denia " target="_blank">Check Towns</a>

With this I get 153 listings

However when I use the same link but have a town that is more than 2 words (La Xara) I end up with 0 results even though there is only one listing in La Xara - example below

<a href="listings_town_xref.php?town_query=-Javea -Benidorm -La Xara -Denia " target="_blank">Check Towns</a>

The question is, how can I get La Xara to be recognised as "one word".

I have tried  -La+Xara and "La Xara" but still get 0 results when I should get 152 listings

Thanks for your help

Andy

By Mikey - April 11, 2013

Andy, I've performed some test on one of my search engines and produced the same issue you're having. I resolved the issue by adding a minus to every word I wanted to exclude. So below is your query modified based on how I was able to drill down on something on my site - using minus to exclude.

<a href="listings_town_xref.php?town_query=-Javea-Benidorm-La-Xara-Denia " target="_blank">Check Towns</a>

You could also try dropping the "La" in "La Xara" and just exclude results with "Xara" and see if that works, as seen below:

<a href="listings_town_xref.php?town_query=-Javea-Benidorm-Xara-Denia " target="_blank">Check Towns</a>

Hope this helps out.

Zick