Index: trunk/install/php/delreserve.php =================================================================== --- trunk/install/php/delreserve.php (リビジョン 70) +++ trunk/install/php/delreserve.php (リビジョン 94) @@ -44,10 +44,9 @@ "); } -$sid = getgetnumform(sid); + $sid = getgetnumform("sid"); if ($sid == "") { die_exit("局がありません
"); @@ -70,14 +69,13 @@ foltia_tvrecord.stationid FROM foltia_tvrecord , foltia_program , foltia_station -WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid "; - - $rs = m_query($con, $query, "DBクエリに失敗しました"); - $maxrows = pg_num_rows($rs); - - if ($maxrows == 0) { +WHERE foltia_tvrecord.tid = foltia_program.tid AND foltia_tvrecord.stationid = foltia_station .stationid AND foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ? "; + +// $rs = m_query($con, $query, "DBクエリに失敗しました"); + $rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid)); +$rowdata = $rs->fetch(); + +if (! $rowdata ) { die_exit("登録番組がありません
"); } - $rowdata = pg_fetch_row($rs, 0); - $tid = htmlspecialchars($rowdata[0]); $stationname = htmlspecialchars($rowdata[1]); @@ -107,6 +105,8 @@ DELETE FROM foltia_tvrecord -WHERE foltia_tvrecord.tid = $tid AND foltia_tvrecord.stationid = $sid "; - $rs = m_query($con, $query, "DBクエリに失敗しました"); +WHERE foltia_tvrecord.tid = ? AND foltia_tvrecord.stationid = ? "; +$rs->closeCursor(); +// $rs = m_query($con, $query, "DBクエリに失敗しました"); + $rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid,$sid)); } @@ -164,15 +164,14 @@ FROM foltia_subtitle , foltia_program ,foltia_station WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid - AND foltia_subtitle.startdatetime >= '$now' AND foltia_program.tid ='$tid' + AND foltia_subtitle.startdatetime >= ? AND foltia_program.tid = ? ORDER BY foltia_subtitle.startdatetime ASC "; - $rs = m_query($con, $query, "DBクエリに失敗しました"); - $maxrows = pg_num_rows($rs); - - if ($maxrows == 0) { +// $rs = m_query($con, $query, "DBクエリに失敗しました"); + $rs = sql_query($con, $query, "DBクエリに失敗しました",array($now,$tid)); +$rowdata = $rs->fetch(); +if (! $rowdata) { echo("放映予定はありません
"); - } - else{ - $maxcols = pg_num_fields($rs); +}else{ + $maxcols = $rs->columnCount(); ?> @@ -192,14 +191,11 @@ \n"); - /* pg_fetch_row で一行取り出す */ - $rowdata = pg_fetch_row($rs, $row); - for ($col = 0; $col < $maxcols; $col++) { /* 列に対応 */ echo("\n"); } echo("\n"); - } + } while ($row = $rs->fetch()); }//end if ?>
".htmlspecialchars($rowdata[$col])."