I have a table (t1) with events data. There are several fields in it, two of which have type 'date':
StartDate and EndDate
I also have 2 months variables:
$mo1 = '02';
$mo2 = 03;
I need to write a query that will select results from t1 present in month 02 (Feb) and 03 (Mar). There may be times when events started in January and continue in February or start in March and continue in in April. I suppose I need to create a sting of those 5 potential months... and somehow match the data in t1. Not sure how to get there.
$months = '01, 02, 03, 04';
SELECT ... FROM t1 WHERE MONTH(StartDate) IN ($months)
Bit confused...