I have these fields in a table
month year
I wanted to make a request based on this
month BETWEEN 4 AND 12 AND year = 2008
OR
month BETWEEN 1 AND 10 AND year is greater than 2008 but equal or less than 2009
I tried this but did not give the correct query result.
"WHERE month BETWEEN 4 AND 12 AND year = 2008 OR month BETWEEN 1 AND 10 AND year 2008<=2009";
NOTE: the numbers here are variables, I showed the actual number so you can easily understand :) any help?
year = (2008 <= 2009) means that the year must be greater than 2008, but equal to or less than 2009
source share