Re: PHP Program Schedule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anything is possible :-)

For the Rowspan, which would mean a program takes more then 30 Minutes.  A 
simplistic way would be to do a Air length mod 30 and that would be your 
rowspan.  In time you may wish to make that more complex, but I'm not sure.

As for the other. (colspan) which means same program in the same slot multiple 
days of the week.  Well, you set your query to return all shows on a particular 
time regardless of day of the week.  Perhaps that would help?
ie
select * from table where airtime = 6am
Then you could parse out which days of the week those shows fall on.  
Perhaps another way to approach it is a database re-design, but I don't know if 
you are in control of the database and its contents.

HTH
-Brad

> I am creating a weekly program schedule for a local tv station and I am 
> also a newbie at mysql and php.
> 
> I currently have my db setup as such:
> 
> Field      Type              Null    Key     Default     Extra
> ---------  ----------------  ------  ------  ----------  --------------
> airid      int(10) unsigned          PRI     (NULL)      auto_increment
> startdate  date                              0000-00-00
> enddate    date                              0000-00-00
> airtime    time                              00:00:00
> airshow    text
> airlength  int(3)                            0
> 
> 
> here is a snippet of what is in my table:
> 
> select * from schedule order by startdate;
> 
> airid   startdate   enddate     airtime   airshow           airlength
> ------  ----------  ----------  --------  ----------------  ---------
> 1       2003-04-07  2003-04-07  05:30:00  The Lesson        30
> 8       2003-04-07  2003-04-11  06:00:00  Living the Life   30
> 
> 
> I want to display the data in a table like this: 
> http://www.kcla-tv.com/admin2/help.php
> ** Note the ROWSPAN on Sunday at 6:00 AM and the COLSPAN's on Monday 
> through Friday
> -- The above table example was hardcoded as an example
> 
> Is this possible? Does anyone have any examples on doing this?
> 
> 
> Jay Fitzgerald, Design Director - CPW-A, CPWDS-A, CPWDV-A, CECM-A, CWCSB-A
> Bayou Internet - http://www.bayou.com
> Toll Free: 888.30.BAYOU (22968)
> Vox: 318.338.2034 / Fax: 318.338.2506
> E-Mail: jayfitz@bayou.com
> ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux