Jump to content

multiple select form and search multiple database fields


richclever

Recommended Posts

Hi,

 

I have a form that has a multiple select and I need to search multiple mysql fields using the data that is passed using the form but am not too sure how to go about it.

 

the form uses prop_type[] to hold the array of values, then I need to search 5 database fields with each of the array values (the form also has other items that are included in the search).

 

There can be upto 10 values in the array that is passed from the form so the potential of 50 different combinations.  I really need to do it in one query but really have got stuck.

 

Can any one help?

 

Thanks,

Richard

Link to comment
Share on other sites

use the information sent to construct your query string based on a series of if (or switch) statements and for loops. concatenate all these together and use it in the query.

 

Apologize but the explanation is a little difficult to grasp. Perhaps some code, db structure would come in handy...

 

 

Link to comment
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.