Red 09 Posted December 8, 2003 Share Posted December 8, 2003 This is for a simple news archive. I need help with a way to make a list like this: 2000 2001 2002 2003 (etc..) Clicking on a year will display all entries posted that year. The yearlist is to be extracted from news entries in a table, and each year is to occur only once in the list. Could someone please help me out? Quote Link to comment Share on other sites More sharing options...
Red 09 Posted December 8, 2003 Author Share Posted December 8, 2003 Never mind, I figured it out: SELECT DISTINCT YEAR(date) FROM articles GROUP BY date; PS! It seems that YEAR() is case-sensitive. year(date) != YEAR(date) for some reason Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.