Well, you could have them seperate the keywords in one field with the word AND, then do something like this.
$sql = "SELECT id, description FROM table WHERE id IS NOT NULL";
$keys = strtoupper($Keywords_required_minlength3);
$akeys = explode(" AND ", $keys);
for($a=0;$a<count($akeys);$a++) {
if($a == 0) {
$results = "\"".substr($akeys[$a],0,1).strtolower(substr($akeys[$a],1))."\"";
}
else {
$results .= " and \"".substr($akeys[$a],0,1).strtolower(substr($akeys[$a],1))."\"";
}
$sql .= " AND (upper(description) LIKE '%".$akeys[$a]."%')";
}
mysql_query($sql);
Or, you could do all the queries, push them into a new array, and use the sort function to re-sort them.