Page 1 of 1

Day of the Week Content Design Question

Posted: Sat Oct 04, 2008 1:30 pm
by tecktalkcm0391
Okay, I have this website with 5 Tabs for Monday through Friday... I have weeks worth of content to be posted the next time that day comes up...

For example:
If today is Thursday .... then....
Monday's content is this weeks Monday content
Tuesday's content is this weeks Tuesday content
Wednesday's content is this weeks Wednesday content
Thursday's content is this weeks Thursday content
Friday's content is last weeks Friday content.

How could I make a script to do this, in which it just prints the date of the Day of the Week for each link... because I just need it to go to MMDDYY.html... because that is were the content is for that day...

Thanks for the help!

Re: Day of the Week Content Design Question

Posted: Sat Oct 04, 2008 2:21 pm
by onion2k

Code: Select all

SELECT `content` FROM `table` WHERE DAY(`live_date`) = DAY(CURDATE()) AND `live_date` < CURDATE() ORDER BY `live_date` DESC
Obviously if you don't want the content for today just swap CURDATE() for a date.

Re: Day of the Week Content Design Question

Posted: Sat Oct 04, 2008 9:35 pm
by tecktalkcm0391
The content is not in a database, the are just HTML files, stored in a directory...

I just can't think of the logic to do it in a IF command in PHP...