What about using the date variable you have in the database. You can call that out use some regualr expressions on it and then test the stories based on what month and year the date variable stores. Just a thought.
What about using the date variable you have in the database. You can call that out use some regualr expressions on it and then test the stories based on what month and year the date variable stores. Just a thought.
Thanks Paul,
I'm thinking I could do something like:
And then I could echo out all the stories with a php for each month, but ideally I'd
like it so I did not have to manually update the archive page, so for example at the end of the month I don't have to go in and add a LIKE July 2005 and add a new php page - it just does it automatically?
Thanks
Chris
Hi Guys,
I have my content managed system with news and hundreds of stories in it with the table structure below.
newsid int(4) No auto_increment
name varchar(255) No
headline varchar(255) No
storydate date No
byline varchar(255) No
opening blob BINARY No
body blob BINARY No
picture varchar(255) No
caption varchar(255) No
Now I want to create an archive each month to put these stories in. So I have a page with links which puts these in monthly order ie:
January 2005 (25 Stories)
Febuary 2005 (26 Stories)
March 2005 (20 Stories)
Then when one of the above is clicked on it shows all the story headlines from that month with the date each story was published and a link through to the actual story.
But how do I go about this? Like I say my stories all are in one news table. Can anyone point me in the right direction? or maybe a archive tutorial (I can't find one googleing!) Can this be done automatically?
Thanks
Chris