View Single Post
  #3 (permalink)  
Old 05-06-2008, 12:09
Eidolon Eidolon is offline
Premium Member
 
Join Date: May 2006
Location: Cambridgeshire
Posts: 444
Default

I guess you could store the 'whose on air' info via a database table. The table could include a 'start time' column, along with a column defining whether it's a weekday or specific day (as presumably normal weekdays are the same). The table could also contain a column defining which file to load.

Then via PHP you could get the date & time, using the day (ie. Monday etc.) you could query along the lines for where CURRENT DATE = "Weekday" or equals "Monday" (though would need adapting to cope with weekends). It could additionally have a query where CURRENT TIME is greater than the start time (column). The query would have a limit of 1, so that only one record loads via an include.

The only complication would be where the presenter goes over midnight, in which instant two rows would probably be needed with one set to 00:00 to prevent no record/file from showing.

__________________
If it ain't broke continue to fix it until it is.
Some cheap plugs... ...St Neots Town F.C. :: IkonForums.com
Reply With Quote