Hello
Ive been working on accessing a MySQL database from a web i know its sounding easy so far but im new to php and sql . I have a page with four object in a form :
keyword : text field
location :combo box
value : combo box
type : combo box
the hard part is that i need to write a query so when if one of these boxes is left empty it will take it as a wildcard.Below is what ive been trying , im not too good at sql so it might be wrong
$query = "select * from table where title like '$keyword' or location like '$location' or type like '$inputtype' or (value > min AND value < max)";
note: in the value combo box there are ranges to choose from like 125-500 ,501-700 and it takes the users choice and sets the min and max values to the required values.
Any help with this problem would be great , thanks in advance