Index: trunk/install/php/reserveepg.php =================================================================== --- trunk/install/php/reserveepg.php (リビジョン 38) +++ trunk/install/php/reserveepg.php (リビジョン 41) @@ -64,7 +64,4 @@
EPGから下記番組を録画予約します。
-
- -
@@ -125,21 +122,57 @@ //重複確認 - - $query = " -SELECT foltia_program.title,foltia_subtitle.tid,foltia_subtitle.pid -FROM foltia_subtitle ,foltia_program ,foltia_tvrecord -WHERE startdatetime ='$startfoltime' -AND enddatetime = '$endfoltime' -AND foltia_subtitle.stationid = '$stationid' -AND foltia_program.tid = foltia_subtitle.tid -AND foltia_tvrecord.tid = foltia_program.tid -AND foltia_tvrecord.stationid = foltia_subtitle.stationid -"; - +$query = " +SELECT +foltia_program .title, +foltia_program .tid, +stationname, +foltia_station.stationid , +foltia_subtitle.countno, +foltia_subtitle.subtitle, +foltia_subtitle.startdatetime , +foltia_subtitle.lengthmin , +foltia_tvrecord.bitrate , +foltia_subtitle.startoffset , +foltia_subtitle.pid +FROM foltia_subtitle , foltia_program ,foltia_station ,foltia_tvrecord +WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid +AND foltia_subtitle.startdatetime ='$startfoltime' +AND foltia_subtitle.enddatetime = '$endfoltime' +AND foltia_station.stationid = '$stationid' +UNION +SELECT +foltia_program .title, +foltia_program .tid, +stationname, +foltia_station.stationid , +foltia_subtitle.countno, +foltia_subtitle.subtitle, +foltia_subtitle.startdatetime , +foltia_subtitle.lengthmin , +foltia_tvrecord.bitrate , +foltia_subtitle.startoffset , +foltia_subtitle.pid +FROM foltia_tvrecord +LEFT OUTER JOIN foltia_subtitle on (foltia_tvrecord.tid = foltia_subtitle.tid ) +LEFT OUTER JOIN foltia_program on (foltia_tvrecord.tid = foltia_program.tid ) +LEFT OUTER JOIN foltia_station on (foltia_subtitle.stationid = foltia_station.stationid ) +WHERE foltia_tvrecord.stationid = 0 +AND foltia_subtitle.startdatetime ='$startfoltime' +AND foltia_subtitle.enddatetime = '$endfoltime' +AND foltia_station.stationid = '$stationid' +"; + + + $rs = m_query($con, $query, "DBクエリに失敗しました"); $maxrows = pg_num_rows($rs); +//print ""; + +print "\n"; + if ($maxrows == 0) { //重複なし + print "
\n"; }else{ $chkoverwrap = pg_fetch_row($rs, 0); @@ -147,5 +180,5 @@ $tid = htmlspecialchars($chkoverwrap[1]); $pid = htmlspecialchars($chkoverwrap[2]); - print "この番組は既に予約済みです。 \n"; + print "
この番組は既に予約済みです。 \n"; if ($tid > 1){ print "予約番組名:$prereservedtitle
\n";