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

SQLite採用

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/install/perl/schedulecheck.pl

    r1 r94  
    1414use DBI; 
    1515use DBD::Pg; 
     16use DBD::SQLite; 
    1617use Schedule::At; 
    1718use Time::Local; 
     
    1920$path = $0; 
    2021$path =~ s/schedulecheck.pl$//i; 
    21 if ($pwd ne "./"){ 
     22if ($path ne "./"){ 
    2223push( @INC, "$path"); 
    2324} 
     
    2930 
    3031#予約番組探し 
    31 $now = &epoch2foldate(`date +%s`); 
     32$now = &epoch2foldate(time()); 
    3233$now = &epoch2foldate($now); 
    3334$checkrangetime = $now   + 15*60;#15分後まで 
    3435$checkrangetime =  &epoch2foldate($checkrangetime); 
    3536 
    36         my $data_source = sprintf("dbi:%s:dbname=%s;host=%s;port=%d", 
    37                 $DBDriv,$DBName,$DBHost,$DBPort); 
    38          $dbh = DBI->connect($data_source,$DBUser,$DBPass) ||die $DBI::error;; 
     37$dbh = DBI->connect($DSN,$DBUser,$DBPass) ||die $DBI::error;; 
    3938 
    40 $DBQuery =  "SELECT count(*)  FROM foltia_tvrecord "; 
    41  
    42  
    43          $sth = $dbh->prepare($DBQuery); 
     39$sth = $dbh->prepare($stmt{'schedulecheck.1'}); 
    4440        $sth->execute(); 
    4541 @titlecount= $sth->fetchrow_array; 
     
    4844exit; 
    4945}else{ 
    50  
    51 $DBQuery =  "SELECT  tid ,stationid  FROM foltia_tvrecord "; 
    52          $sth = $dbh->prepare($DBQuery); 
     46    $sth = $dbh->prepare($stmt{'schedulecheck.2'}); 
    5347        $sth->execute(); 
    5448while (($tid,$stationid  ) = $sth->fetchrow_array()) { 
track feed