i have a query to query a record for a period (eg : from March 2000 - March 2003) like :
select * from hsr_h
where (month(hsrdate) >= '$month1' and
year(hsrdate) >= 'year1')
and (month(hsrdate) <= '$month2' and year(hsrdate) <= '$year2')
where $month1, $month2, $year1, $year2 are var passed by a form. The query produces nothing. But if edit it to
select * from hsr_h
where month(hsrdate) >= '$month1' and
year(hsrdate) >= '$year1'
order by hsrdate
will work fine (using only 2 var)