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? Link to comment https://forums.phpfreaks.com/topic/1471-generating-a-list-archive-of-each-year-of-the-entries/ 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 Link to comment https://forums.phpfreaks.com/topic/1471-generating-a-list-archive-of-each-year-of-the-entries/#findComment-4850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.