I've got a MYSQL database of news which i want to arrange by date but im finding it difficult to code.
I have a VARCHAR in my database which has a timestamp in it eg. 071101130000 (YYMMDDHHMMSS) and I want to sort the news as follows..
1st Month
- 1st News Post
- 2nd News Post
- 3rd News Post
2nd Month
- 1st News Post
- 2nd News Post
- 3rd News Post
I cant get my head around selecting the months which have news posts in them (if I start posting news on the 25th October, i dont want September showing up as a month) and then selecting the seperate news posts for that month.
Any ideas?
I have a VARCHAR in my database which has a timestamp in it eg. 071101130000 (YYMMDDHHMMSS) and I want to sort the news as follows..
1st Month
- 1st News Post
- 2nd News Post
- 3rd News Post
2nd Month
- 1st News Post
- 2nd News Post
- 3rd News Post
I cant get my head around selecting the months which have news posts in them (if I start posting news on the 25th October, i dont want September showing up as a month) and then selecting the seperate news posts for that month.
Any ideas?