i guess this place gets viewed the most, can anyone with some php mysql experience help me with this.
$query = "SELECT * FROM airline where ffrom = '$ffrom' OR fto = '$fto' OR flight_no = '$flight_no' OR departure = '$departure' OR arrival = '$arrival'";
As you can see on my current query it uses OR, so the user on the webpage can jus type in one thing and it will show, but i want to make the searches more precise so they can enter 2 out of the 5 things or more if they like. If i use AND for this and the user leaves a field blank, then it will return no results as it sees the user enter " ". What code do i need to fix this!
hope someone can help, sorry for the poor explanation, im tired!! thanks for any help if i get any from chit chat
$query = "SELECT * FROM airline where ffrom = '$ffrom' OR fto = '$fto' OR flight_no = '$flight_no' OR departure = '$departure' OR arrival = '$arrival'";
As you can see on my current query it uses OR, so the user on the webpage can jus type in one thing and it will show, but i want to make the searches more precise so they can enter 2 out of the 5 things or more if they like. If i use AND for this and the user leaves a field blank, then it will return no results as it sees the user enter " ". What code do i need to fix this!
hope someone can help, sorry for the poor explanation, im tired!! thanks for any help if i get any from chit chat