Index: trunk/install/php/reserveprogram.php
===================================================================
--- trunk/install/php/reserveprogram.php (リビジョン 83)
+++ trunk/install/php/reserveprogram.php (リビジョン 94)
@@ -53,12 +53,12 @@
//タイトル取得
- $query = "select title from foltia_program where tid='$tid'";
- $rs = m_query($con, $query, "DBクエリに失敗しました");
- $maxrows = pg_num_rows($rs);
-
- if ($maxrows == 0) {
+ $query = "select title from foltia_program where tid = ? ";
+// $rs = m_query($con, $query, "DBクエリに失敗しました");
+$rs = sql_query($con, $query, "DBクエリに失敗しました",array($tid));
+$rowdata = $rs->fetch();
+if (! $rowdata) {
die_exit("登録番組がありません
");
}
- $rowdata = pg_fetch_row($rs, 0);
+
$title = htmlspecialchars($rowdata[0]);
?>
@@ -100,22 +100,19 @@
FROM foltia_subtitle , foltia_program ,foltia_station
WHERE foltia_program.tid = foltia_subtitle.tid AND foltia_station.stationid = foltia_subtitle.stationid
- AND foltia_program.tid ='$tid'
+ AND foltia_program.tid = ?
ORDER BY stationrecch DESC
";
-
- $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($tid));
+$rowdata = $rs->fetch();
+if (! $rowdata) {
echo("放映局情報がまだはいってません
");
}
else{
- $maxcols = pg_num_fields($rs);
+ $maxcols = $rs->columnCount();
echo("\n");
}//endif
@@ -182,15 +179,15 @@
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);
+ $maxcols = $rs->columnCount();
?>