127 | | |
---|
128 | | $query = " |
---|
129 | | SELECT foltia_program.title,foltia_subtitle.tid,foltia_subtitle.pid |
---|
130 | | FROM foltia_subtitle ,foltia_program ,foltia_tvrecord |
---|
131 | | WHERE startdatetime ='$startfoltime' |
---|
132 | | AND enddatetime = '$endfoltime' |
---|
133 | | AND foltia_subtitle.stationid = '$stationid' |
---|
134 | | AND foltia_program.tid = foltia_subtitle.tid |
---|
135 | | AND foltia_tvrecord.tid = foltia_program.tid |
---|
136 | | AND foltia_tvrecord.stationid = foltia_subtitle.stationid |
---|
137 | | "; |
---|
138 | | |
---|
| 124 | $query = " |
---|
| 125 | SELECT |
---|
| 126 | foltia_program .title, |
---|
| 127 | foltia_program .tid, |
---|
| 128 | stationname, |
---|
| 129 | foltia_station.stationid , |
---|
| 130 | foltia_subtitle.countno, |
---|
| 131 | foltia_subtitle.subtitle, |
---|
| 132 | foltia_subtitle.startdatetime , |
---|
| 133 | foltia_subtitle.lengthmin , |
---|
| 134 | foltia_tvrecord.bitrate , |
---|
| 135 | foltia_subtitle.startoffset , |
---|
| 136 | foltia_subtitle.pid |
---|
| 137 | FROM foltia_subtitle , foltia_program ,foltia_station ,foltia_tvrecord |
---|
| 138 | 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 |
---|
| 139 | AND foltia_subtitle.startdatetime ='$startfoltime' |
---|
| 140 | AND foltia_subtitle.enddatetime = '$endfoltime' |
---|
| 141 | AND foltia_station.stationid = '$stationid' |
---|
| 142 | UNION |
---|
| 143 | SELECT |
---|
| 144 | foltia_program .title, |
---|
| 145 | foltia_program .tid, |
---|
| 146 | stationname, |
---|
| 147 | foltia_station.stationid , |
---|
| 148 | foltia_subtitle.countno, |
---|
| 149 | foltia_subtitle.subtitle, |
---|
| 150 | foltia_subtitle.startdatetime , |
---|
| 151 | foltia_subtitle.lengthmin , |
---|
| 152 | foltia_tvrecord.bitrate , |
---|
| 153 | foltia_subtitle.startoffset , |
---|
| 154 | foltia_subtitle.pid |
---|
| 155 | FROM foltia_tvrecord |
---|
| 156 | LEFT OUTER JOIN foltia_subtitle on (foltia_tvrecord.tid = foltia_subtitle.tid ) |
---|
| 157 | LEFT OUTER JOIN foltia_program on (foltia_tvrecord.tid = foltia_program.tid ) |
---|
| 158 | LEFT OUTER JOIN foltia_station on (foltia_subtitle.stationid = foltia_station.stationid ) |
---|
| 159 | WHERE foltia_tvrecord.stationid = 0 |
---|
| 160 | AND foltia_subtitle.startdatetime ='$startfoltime' |
---|
| 161 | AND foltia_subtitle.enddatetime = '$endfoltime' |
---|
| 162 | AND foltia_station.stationid = '$stationid' |
---|
| 163 | "; |
---|
| 164 | |
---|
| 165 | |
---|
| 166 | |
---|