I am trying to select offers between two dates, one of start and one of expiration and in case the expiration date is empty or null it will always show the offers.

**Table**

```
+----------------+---------------------+---------------------+
|   deal_title   |     deal_start      |   deal_expire   |
+----------------+---------------------+---------------------+
| Example Deal   | 10-24-2021 16:10:00 | 10-25-2021 16:10:00 |
| Example Deal 2 | 10-24-2021 16:10:00 | NULL                |
+----------------+---------------------+---------------------+

```

**Php Function to get the current date by timezone.**

```
function getDateByTimeZone(){
   $date = new DateTime("now", new DateTimeZone("Europe/London") );
   return $date->format('m-d-Y H:i:s');
}

```

**Mysql query:**

```
SELECT deals.*, categories.category_title AS category_title 
FROM deals 
LEFT JOIN categories ON deal_category = categories.category_id 
WHERE deals.deal_status = 1 
 AND deals.deal_featured = 1 
 AND deals.deal_start >= '".getDateByTimeZone()."' 
 AND '".getDateByTimeZone()."' < deals.deal_expire 
 OR deals.deal_expire IS NULL 
 OR deals.deal_expire = '' 
GROUP BY deals.deal_id ORDER BY deals.deal_created DESC

```