Index: trunk/install/php/showplaylist.php =================================================================== --- trunk/install/php/showplaylist.php (リビジョン 83) +++ trunk/install/php/showplaylist.php (リビジョン 94) @@ -115,8 +115,10 @@ FROM foltia_subtitle , foltia_program WHERE foltia_program.tid = foltia_subtitle.tid - AND foltia_subtitle.tid = $filesplit[0] -"; -$rs = m_query($con, $query, "DBクエリに失敗しました"); -$rowdata = pg_fetch_row($rs, $row); + AND foltia_subtitle.tid = ? +"; +//$rs = m_query($con, $query, "DBクエリに失敗しました"); +$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0])); + $rall = $rs->fetchAll(); + $rowdata = $rall[$row]; //print" $fName./$rowdata[1]//$rowdata[2]
\n"; $title = $rowdata[1]; @@ -130,9 +132,11 @@ FROM foltia_subtitle , foltia_program WHERE foltia_program.tid = foltia_subtitle.tid - AND foltia_subtitle.tid = $filesplit[0] - AND foltia_subtitle.countno = $filesplit[1] -"; -$rs = m_query($con, $query, "DBクエリに失敗しました"); -$rowdata = pg_fetch_row($rs, $row); + AND foltia_subtitle.tid = ? + AND foltia_subtitle.countno = ? +"; +//$rs = m_query($con, $query, "DBクエリに失敗しました"); +$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0],$filesplit[1])); + $rall = $rs->fetchAll(); + $rowdata = $rall[$row]; //print" $fName./$rowdata[1]/$rowdata[2]/$rowdata[3]
\n"; $title = $rowdata[1]; @@ -197,11 +201,9 @@ } -$rs = m_query($con, $query, "DBクエリに失敗しました"); -$maxrows = pg_num_rows($rs); - -if ($maxrows > 0){ -for ($row = 0; $row < $maxrows; $row++) { -$rowdata = pg_fetch_row($rs, $row); - +//$rs = m_query($con, $query, "DBクエリに失敗しました"); +$rs = sql_query($con, $query, "DBクエリに失敗しました"); +$rowdata = $rs->fetch(); +if ($rowdata) { + do { $tid = htmlspecialchars($rowdata[0]); $title = htmlspecialchars($rowdata[1]); @@ -235,5 +237,5 @@ print "\n "; -}//for + } while ($rowdata = $rs->fetch()); }else{ print " @@ -262,9 +264,8 @@ "; -$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クエリに失敗しました"); + $rowdata = $rs->fetch(); + if ($rowdata) { print "

未読タイトルを表示します。
@@ -279,14 +280,11 @@ "; -for ($row = 0; $row < $maxrows; $row++) { -$rowdata = pg_fetch_row($rs, $row); - + do { $tid = htmlspecialchars($rowdata[0]); $title = htmlspecialchars($rowdata[1]); - print "$tid$title\n"; -}//for + } while ($rowdata = $rs->fetch()); print "\n"; }//if maxrows