I have a table with news, one of the fields is 'date'.
I am using ASP/VBscript. and MS SQL 2008.
I need two queries.
First one to return all results which date is the cureent years.
The second query will group all news posted in previous years by year display the year and the number of news which have that year. So for example it will display:
-- This years news # 1 --
-- This years news # 2 --
Finally the years displayed will have a link to another page, i will pass on the year as parameter ... say : yearid = 2009
So the last sql will display all news with the year passed, sort of like the first query only its not current year but year = request.querystring("yearid")
Hope that makes sense.