Jump to content

Recommended Posts

I have successfully made a search feature for my site. The user may search for a job and choose a region from a dropdown list. The dropdown list has region names with values such as 1, 2, 3 etc.

 

The search feature basically selects * from db where region='$region' AND (blah blah LIKE blah) ORDER BY blah.

 

The problem is, region with value 0 is "All Regions", but when searching with that value, it returns nothing. Also, regions 2 is basically the bigger area that has regions 2,4,5,6,7,8,9 and region 10 has 11,12,13,14,15.

 

So how can I get it to display all jobs LIKE keyword if user searches All Regions (0), and the same with the 2 other main regions (2,10).

 

Hope that makes sense!

 

Thank you,

Sam.

Link to comment
https://forums.phpfreaks.com/topic/83741-solved-search-parameter-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.