Comparing Dates within a Date range
I have a start date and end date. I want to compare another date within the start date and end date.
I am usying mysql db and the start date and end date is coming from db and the date which needs to be compared is coming from user. here is the code i am trying which is not working:
Please help me with this.
$q1 = "SELECT * FROM reservations WHERE '$startd' >= sdate AND '$startd' =< fdate";
$r1 = mysql_query($q1) or die(mysql_error());
$rows = mysql_num_rows($r1);