using less than calculation in php mysql
<p>i have three dates to compare:</p>

<pre><code>$pDate = date("d/m/Y G:i A");
$lDate = new DateTime('last wednesday G:i A');
$cDate = new DateTime('next tuesday G:i A');
</code></pre>

<p>if <em>$pDate</em> is in between <em>$lDate</em> and <em>$cDate</em> then mysql table field is updated yes</p>

<p>i.e. the 9th is in between the 8th and 14th </p>

<p>if <em>$pDate</em> is less than equal to <em>$lDate</em> then mysql table field is updated no</p>

<p><em>$pDate</em> cannot be more than <em>$cDate</em></p>

<p>how would i write a elseif statement for the above... </p>

<p>i.e.</p>

<pre><code>elseif ( .... ) {
    mysql_query("UPDATE ... SET ... WHERE ...");
}
</code></pre>

<p>any help would be appreciated!</p>

<p>many thanks and God bless!</p>
