आप जांच सकते हैं कि कौन से फ़ील्ड सेट हैं और रनटाइम के अनुसार क्वेरी करें। ऐसा कुछ आप कर सकते हैं:
$query = "";
$keyword = $_REQUEST['keyword'];
$country = $_REQUEST['country'];
$category = $_REQUEST['category'];
if(isset($keyword)){//if keyword set goes here
$query = "SELECT * FROM table1 WHERE Name LIKE '%$keyword%' OR ZipCode LIKE '%$keyword%' OR country LIKE '%$keyword%'";
if(isset($category)){
$query .= "AND category LIKE '$category'";
}
if(isset($country)){
$query . = "AND country LIKE '$country'"
}
}else if (isset($category)){ //if keyword not set but category set then goes here
$query = "SELECT * FROM table1 WHERE category LIKE '$category'";
if(isset($country)){
$query . = "AND country LIKE '$country'";
}
}else if(isset($country)){//if only country set goes here
$query = "SELECT * FROM table1 WHERE country LIKE '$country'"
}