Question: I've an AWS API gateway in front of a REST API service. I would like to remove one/some HTTP headers when I forward the request to the origin.

I know how to do this using a lambda but I'm just wondering is there is something built in.

Answer: 
I think the simpler approach is boolean logic:

```
SELECT `id`, `title`, `body`, `created_on` 
FROM `fcm_messages` 
WHERE 
    (`city` = :city AND `street` = :street AND `building` = :building)
    OR (`city` = :city AND `street` = :street AND `building` = '-')
    OR (`city` = :city AND `street` = '-' AND `building` = '-')
    OR (`city` = '-' AND `street` = '-' AND `building` = '-')

```

Note that this uses query parameters to pass the variables to the query rather than concatenating them into the query string: this is both safer and more efficient.
You can build a query simply by putting each condition into brackets and combine them by a logical OR for each one.

```
$query = "SELECT `id`, `title`, `body`, `created_on` FROM `fcm_messages` WHERE ";

$conditions[] = "(`city`='$city' AND `street`='$street' AND `building`='$building')";
$conditions[] = "(`city`='$city' AND `street`='$street' AND `building`='-')";
$conditions[] = "(`city`='$city' AND `street`='-' AND `building`='-')";
$conditions[] = "(`city`='-' AND `street`='-' AND `building`='-')";

$query .= join(' OR ', $conditions);

```