I want a SQL statement to select the rows that have the date col between two specific dates...
Here is what I have
$sql = "SELECT EVENT_ID, EVENT_DATE, EVENT_HEADLINE
FROM CALENDAR_EVENTS
WHERE EVENT_DATE >= '$start_of_month' AND EVENT_DATE <= '$end_of_month'
ORDER BY EVENT_DATE DESC";
EVENT_DATE is date type in the mysql database... is what I have done wrong?
for testing I have
$start_of_month = 2001-08-01
$end_of_month = 2001-08-31
and there are valid entries in the database
Here is what I have
$sql = "SELECT EVENT_ID, EVENT_DATE, EVENT_HEADLINE
FROM CALENDAR_EVENTS
WHERE EVENT_DATE >= '$start_of_month' AND EVENT_DATE <= '$end_of_month'
ORDER BY EVENT_DATE DESC";
EVENT_DATE is date type in the mysql database... is what I have done wrong?
for testing I have
$start_of_month = 2001-08-01
$end_of_month = 2001-08-31
and there are valid entries in the database