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

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...

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.