Hi folks. I have a database with a date field where the dates are stored in a format like yyyy-mm-dd. I want my users to be able to search the entire date range but exclude results from certain years. Here's the query I've got:

Code:
$query = "select * from table where date like \"%$trimmed%\" order by date";
How should I rewrite this to get the effect of
Code:
$query = "select * from dailies where date like \"%$trimmed%\" (EXCEPT IF DATE IS 1980-06 to 1980-12) order by date";
Thanks greatly for your help.