Get all unique numbers in MySQL table using php
I am trying to build an archive list for a blog using php and mysql. The
problem is I am not sure of the best way to do this.
I was hoping there was a way to get a list of years and than display them
so lets say my table has id | year | content and has the current rows
1 | 2013 | content
2 | 2013 | content
3 | 2013 | content
4 | 2012 | content
5 | 2012 | content
6 | 2011 | content
is it possible to make a mysql statement that well only return IDs 1,4,6,
if so how?
No comments:
Post a Comment