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

SQLite採用

ファイル:

凡例:

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

    r83 r94  
    7272//min pidを探す 
    7373$query = "SELECT min(pid) FROM  foltia_subtitle "; 
    74         $rs = m_query($con, $query, "DBクエリに失敗しました"); 
    75         $maxrows = pg_num_rows($rs); 
    76         if ($maxrows == 0){ 
     74//      $rs = m_query($con, $query, "DBクエリに失敗しました"); 
     75        $rs = sql_query($con, $query, "DBクエリに失敗しました"); 
     76        $rowdata = $rs->fetch(); 
     77        if (! $rowdata) { 
    7778        $insertpid = -1 ; 
    7879        }else{ 
    79         $rowdata = pg_fetch_row($rs, 0); 
    80          
    8180        $insertpid = $rowdata[0]; 
    8281                if ($insertpid > 0){ 
     
    8887// next 話数を探す 
    8988$query = "SELECT max(countno) FROM  foltia_subtitle WHERE tid = 0"; 
    90         $rs = m_query($con, $query, "DBクエリに失敗しました"); 
    91         $maxrows = pg_num_rows($rs); 
    92         if ($maxrows == 0){ 
     89//      $rs = m_query($con, $query, "DBクエリに失敗しました"); 
     90        $rs = sql_query($con, $query, "DBクエリに失敗しました"); 
     91        $rowdata = $rs->fetch(); 
     92        if (! $rowdata) { 
    9393        $nextcno = 1 ; 
    9494        }else{ 
    95         $rowdata = pg_fetch_row($rs, 0); 
    9695        $nextcno = $rowdata[0]; 
    9796        $nextcno++ ; 
     
    124123insert into foltia_subtitle  (pid ,tid ,stationid , countno ,subtitle , 
    125124startdatetime ,enddatetime ,startoffset , lengthmin , epgaddedby )  
    126 values ( '$insertpid','0','$stationid', 
    127        '$nextcno','$subtitle','$startdatetime','$enddatetime','0' ,'$lengthmin' , '$memberid')"
    128         $rs = m_query($con, $query, "DBクエリに失敗しました"); 
     125values ( ?,'0',?,?,?,?,?,'0',?,?)"; 
     126//     $rs = m_query($con, $query, "DBクエリに失敗しました")
     127        $rs = sql_query($con, $query, "DBクエリに失敗しました",array($insertpid,$stationid,$nextcno,$subtitle,$startdatetime,$enddatetime,$lengthmin,$memberid)); 
    129128 
    130129        //addatq.pl 
track feed