How to use PHP If statement comparing to SQL Date and Current Date? : <p>In my SQL Database i have a date column.
I want to use a PHP if statement to show some text if the date from the DB equals todays date.
Aswell as that, use an else to show something else if the date does not equal today.</p>

<p>Running PHP 7</p>

<p>I have lost count of what i have tried with this but don't seem to get anywhere.</p>

<p>I am fetching the data here:</p>

<pre><code>    $sql1 = 'SELECT `date` FROM `operations`.`opsroom` ORDER BY `opsroom`.`date` ASC, `opsroom`.`starttime` ASC LIMIT 1';
    $nextsession = mysqli_query($conn, $sql1);
</code></pre>

<p>Later on in the file is where i am using this:</p>

<pre><code>    &lt;?php
    while ($row = mysqli_fetch_assoc($nextsession)) 
    {
    if( $row['date'] == DATE(date)){
    echo "BOOKINGS TODAY";
    } else {
    echo "No Bookings";
    }
    }
    ?&gt;
</code></pre>

<p>Only error i get at the moment is PHP Warning:  Use of undefined constant date - assumed 'date' (this will throw an Error in a future version of PHP)</p>
