チェンジセット 94: trunk/install/php/titlelist.php

差分発生行の前後
無視リスト:
コミット日時:
2010/02/28 22:28:26 (14 年前)
コミッタ:
sorshi
ログメッセージ:

SQLite採用

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/install/php/titlelist.php

    r70 r94  
    5151ORDER BY foltia_program.tid  DESC 
    5252        "; 
    53       $rs = m_query($con, $query, "DBクエリに失敗しました"); 
    54        $maxrows = pg_num_rows($rs); 
    55                          
    56                if ($maxrows == 0) { 
     53//    $rs = m_query($con, $query, "DBクエリに失敗しました"); 
     54$rs = sql_query($con, $query, "DBクエリに失敗しました"); 
     55$rowdata = $rs->fetch(); 
     56if (! $rowdata) { 
    5757                die_exit("番組データがありません<BR>"); 
    58                          
    5958                } 
    60  
    6159?> 
    6260 
     
    7270<? 
    7371                /* フィールド数 */ 
    74                $maxcols = pg_num_fields($rs); 
     72$maxcols = $rs->columnCount(); 
    7573                ?> 
    7674  <table BORDER="0" CELLPADDING="0" CELLSPACING="2" WIDTH="100%"> 
     
    8684                <?php 
    8785                        /* テーブルのデータを出力 */ 
    88                         for ($row = 0; $row < $maxrows; $row++) { /* 行に対応 */ 
     86    do { 
    8987                                echo("<tr>\n"); 
    90                                 /* pg_fetch_row で一行取り出す */ 
    91                                 $rowdata = pg_fetch_row($rs, $row); 
     88 
    9289                                //TID 
    9390                                        echo("<td><a href=\"reserveprogram.php?tid=" . 
     
    10097                                        print "<td><A HREF = \"showlibc.php?tid=".htmlspecialchars($rowdata[0])."\">mp4</A></td>\n"; 
    10198                                echo("</tr>\n"); 
    102                         } 
     99    } while ($rowdata = $rs->fetch()); 
    103100                ?> 
    104101        </tbody> 
track feed