richclever Posted May 1, 2007 Share Posted May 1, 2007 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 Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted May 1, 2007 Share Posted May 1, 2007 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... Quote Link to comment Share on other sites More sharing options...
richclever Posted May 1, 2007 Author Share Posted May 1, 2007 I see what you mean, just came to the same conclusion myself but great to have it confirmed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.