Retrieve mysql records using datetime a week before the event and then all events already expired this year
<p>I have an exhibitions page on my website that I want to list all events coming up a week before they start and also to keep them displayed until the end of the current year after the event.
We used to have them displayed all year but my employer now wants to only display them a week before the event and for the events to stay listed until the start of the new year.</p>

<p>I have the following code which works for extracting records from a week before the event. However, the part I'm struggling with is keeping each of the records from this year displayed for the remainder of the year.</p>

<pre><code>if ($exhstmt = $mysqli-&gt;prepare("SELECT eventname, startdate, enddate, location, location_url 
                                 FROM exhibitions 
                                 WHERE DATE(startdate) = date_sub(date(NOW()), INTERVAL -1 WEEK) 
                                 ORDER BY startdate ASC")){
</code></pre>

<p>I did try to have the current year stated in the database and extract from that but it doesn't work with the above.</p>

<p>Any help would be greatly appreciated! Thank you.</p>