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

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

SQLite採用

ファイル:

凡例:

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

    r70 r94  
    5151$query = " 
    5252SELECT  foltia_program.tid,foltia_program.title, 
    53 foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" ~~ 'M%%'  AND foltia_program.tid = foltia_subtitle.tid AND foltia_program.tid = $tid    
     53foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" LIKE 'M%%'  AND foltia_program.tid = foltia_subtitle.tid AND foltia_program.tid = $tid    
    5454ORDER BY \"enddatetime\" DESC  
    5555offset 0 limit  $max  
     
    5959SELECT  foltia_program.tid,foltia_program.title  
    6060FROM  foltia_program    
    61 WHERE foltia_program.tid = $tid    
     61WHERE foltia_program.tid = ?    
    6262"; 
    63         $titlers = m_query($con, $query, "DBクエリに失敗しました"); 
    64         $rowdata = pg_fetch_row($titlers, 0);  
     63//      $titlers = m_query($con, $query, "DBクエリに失敗しました"); 
     64        $titlers = sql_query($con, $query, "DBクエリに失敗しました",array($tid)); 
     65        $rowdata = $titlers->fetch(); 
    6566        $rsstitle = $rowdata[1]; 
    6667}else{ 
     
    6869$query = " 
    6970SELECT  foltia_program.tid,foltia_program.title, 
    70 foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" ~~ 'M%%'  AND foltia_program.tid = foltia_subtitle.tid ORDER BY \"enddatetime\" DESC  
    71 offset 0 limit  $max  
     71foltia_subtitle.countno , foltia_subtitle.subtitle , foltia_subtitle.startdatetime, foltia_subtitle.pspfilename,foltia_subtitle.lengthmin,foltia_subtitle.enddatetime   FROM foltia_subtitle , foltia_program   WHERE \"pspfilename\" LIKE 'M%%'  AND foltia_program.tid = foltia_subtitle.tid ORDER BY \"enddatetime\" DESC  
     72offset 0 limit  ?  
    7273        "; 
    7374        $rsstitle = "新規録画"; 
     
    9697print $header; 
    9798 
    98         $rs = m_query($con, $query, "DBクエリに失敗しました"); 
    99         $maxrows = pg_num_rows($rs); 
     99//      $rs = m_query($con, $query, "DBクエリに失敗しました"); 
     100        $rs = sql_query($con, $query, "DBクエリに失敗しました",array($max)); 
     101$rowdata = $rs->fetch(); 
    100102 
    101 if ($maxrows == 0) { 
     103if (! $rowdata) { 
    102104                                //die_exit("No items");  
    103105}else{ 
    104  
    105 for ($row = 0; $row < $maxrows; $row++) {  
    106                 $rowdata = pg_fetch_row($rs, $row); 
    107                  
     106        do { 
    108107//$title = mb_convert_encoding($rowdata[1],"UTF-8", "EUC-JP"); 
    109108$tid =  $rowdata[0]; 
     
    163162print $item ; 
    164163 
    165 }//for 
     164        } while ($rowdata = $rs->fetch()); //do 
    166165 
    167166}//if 
track feed