liammc87 Posted May 17, 2007 Share Posted May 17, 2007 I have a task and I'm unsure how to approach it. I have a database (MySQL) which stores news articles - just the general subject, content etc. The date is set with a timestamp. What I want to do is sort of "Archive" my news to months. So I have one page which shows every article from the current month - and a link to every other month with an article. Then when this link is clicked it shows the news from that month. I cannot figure out how to approach this - any help is appreciated! Thanks, Liam. Link to comment https://forums.phpfreaks.com/topic/51802-storage-of-news-articles/ Share on other sites More sharing options...
MadTechie Posted May 17, 2007 Share Posted May 17, 2007 Add a field for the month set it to 1-12 (for each month) then on the page that displays the details from the database add $theDate= getdate(); "SELECT * from table WHERE month = ".$theDate['mon']; Link to comment https://forums.phpfreaks.com/topic/51802-storage-of-news-articles/#findComment-255241 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.