sfludd83 Posted October 16, 2009 Share Posted October 16, 2009 Howdy everyone. I'm going to start by saying that I'm brand new to PHP/MySQL as far as programming is concerned, so thank you in advance for your responses. -Literally started programming with this about 2-3 weeks ago- I have an HTML form, using the POST method, linked to an external PHP file for processing. The form has only 4 inputs, all of which are dropdown select boxes. The purpose of this form is to complete a search based on the criteria within the four inputs via a MySQL query. My goal is to make it so that the search can be done using any combination of these inputs and any number of them except zero. At least 1 box will always need to be used. I have made attempts at this already. Creating variables and control structures are not a problem for me, though I am still getting a grip on some of the complexities they can entail. I could make separate queries for each and every situation in the form, but that would seem less efficient. Also I'd like to eventually use PHP/MySQL professionally so tackling things like this will come in handy. I have a general idea on how to do this, and I've already made parts of the query dynamically, but when you start doing JOINS it gets super complicated. That's what I will need help with. Also, there are about 3 or 4 separate tables involved in the JOIN query. Thanks again! Link to comment https://forums.phpfreaks.com/topic/177853-dynamically-generated-mysql-query-based-on-form-input/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.