I'm drawing a blank.
I have a SQL query that I'm trying to look for a date range.
I have the following definitions...
$year = date('Y');
$month = date('m');
$first = date('Y-m-d', mktime(0, 0, 0, $month, 1, $year));
$last = date('Y-m-t', mktime(0, 0, 0, $month, 1, $year));
My query is as follows...
SELECT * FROM table1 WHERE Date BETWEEN '".$first."' AND '".$last."'
What am I doing wrong?
Thanks in advance for the helping hand.