lets say i have two drop down list and one button on my search page:
From
<select id="1stdate">
Until
<select id="2nddate">
<input type="button" id="search">
i want to search data from 1stdate
until 2nddate
, how to use WHERE CLAUSE for this case? for ex. i want to search data "from 09-2010 until 11-2010".
this my query:
SELECT CONCAT( YEAR(Inspection_datetime ),'-',LPAD(MONTH(Inspection_datetime),2,'0'))
FROM `inspection_report`
GROUP BY CONCAT( MONTH(Inspection_datetime ),YEAR(Inspection_datetime))
ORDER BY CONCAT( MONTH(Inspection_datetime ),YEAR(Inspection_datetime)) DESC