I have three dates to compare:
$pDate = date("d/m/Y G:i A");
$lDate = new DateTime('last wednesday G:i A');
$cDate = new DateTime('next tuesday G:i A');
If $pDate is in between $lDate and $cDate then mysql table field is updated yes
i.e. the 9th is in between the 8th and 14th
If $pDate is less than equal to $lDate then MySQL table field is updated no
$pDate cannot be more than $cDate
How would I write a elseif statement for the above? i.e.
elseif ( .... ) {
mysql_query("UPDATE ... SET ... WHERE ...");
}