Есть нюансы, но в целом примерно так
$filters = [
['name' => 'order_number', 'condition' => '=', 'field' => 'order', 'default' => ''],
['name' => 'object', 'condition' => '=', 'field' => 'object', 'default' => 'Все'],
['name' => 'urgent', 'condition' => '=', 'field' => 'urgent', 'default' => false],
];
$conditions = '';
foreach ($filters as $filter) {
$value = $_POST[$filter['name']];
if($value = $filter['default']) continue;
$conditions .= ' ' . $filter['field'] . $filter['condition'] . $value;
}
if($conditions !== '') $conditions = ' WHERE ' . $conditions;