Menu

#1 have now.php sort by channel

open
nobody
None
5
2002-10-09
2002-10-09
No

I don't know what station a tv show is on, but I do
know the channel. I would like to have the option of
having now.php order the stations by channel rather
than station name and also show the channel next to the
station name.
(ie KCPT 11 instead of just KCPT)

I might be able to code this myself. If someone can
send me some specs (which screen should have the order
by option etc..) I would be glad to give it a shot.

Discussion

  • scott edlund

    scott edlund - 2003-03-04

    Logged In: YES
    user_id=673677

    Yeah, I hated that too. I have a patch for ya, you'll
    prolly have to apply by hand. Let me know if you need help.

    I'm going to see if I can attach it as a file, if not I'll
    have to repost it here.

     
  • scott edlund

    scott edlund - 2003-03-04

    Logged In: YES
    user_id=673677

    Oops, well here goes... not sure how it will show up.

    @@ -171,7 +174,7 @@
    OR (UNIX_TIMESTAMP(stop) > '$start'
    AND UNIX_TIMESTAMP(stop) < '$end')
    OR (UNIX_TIMESTAMP(start) <=
    '$start' AND UNIX_TIMESTAMP(stop) >= '$end')
    OR (UNIX_TIMESTAMP(start) >= '$start'
    AND UNIX_TIMESTAMP(stop) <= '$end') )
    - and program.sid=station.sid ORDER BY
    station.sname,start";
    + and program.sid=station.sid ORDER BY
    station.channel,start";

    $result = $sql->query($query);
    if (!$sql->results($result)) {
    @@ -190,12 +193,12 @@
    $station_icons = getconfig("station_icons");

    # get number of pages
    - $query = "select distinct sname from program,station
    where program.sid=station.sid AND
    + $query = "select distinct channel from
    program,station where program.sid=station.sid AND
    ( (UNIX_TIMESTAMP(start) > '$start'
    AND UNIX_TIMESTAMP(start) < '$end')
    OR (UNIX_TIMESTAMP(stop) > '$start'
    AND UNIX_TIMESTAMP(stop) < '$end')
    OR (UNIX_TIMESTAMP(start) <=
    '$start' AND UNIX_TIMESTAMP(stop) >= '$end')
    OR (UNIX_TIMESTAMP(start) >=
    '$start' AND UNIX_TIMESTAMP(stop) <= '$end') )
    -
    order by sname;";
    +
    order by channel;";
    $station_result = $sql->query($query);
    $num_pages = ceil(mysql_num_rows($station_result) /
    $num_stations);

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.