チェンジセット 121: trunk/install/perl/xmltv2foltia.pl
- コミット日時:
- 2010/10/04 21:05:24 (15 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/perl/xmltv2foltia.pl
r120 r121 16 16 # 17 17 18 use LWP::Simple;18 #use LWP::Simple; 19 19 #use Encode qw(from_to); 20 20 #use encoding 'euc-jp', STDIN=>'utf8', STDOUT=>'euc-jp' ; # 標準入力:utf8 21 21 # http://www.lr.pi.titech.ac.jp/~abekawa/perl/perl_unicode.html 22 22 use Jcode; 23 use Data::Dumper;23 #use Data::Dumper; 24 24 use Time::Local; 25 25 use DBI; … … 224 224 $foltiaendtime = substr($foltiaendtime,0,12); # 12桁 200508072355 225 225 226 #$sth = $dbh->prepare($stmt{'xmltv2foltia.replaceepg.1'});226 $sth = $dbh->prepare($stmt{'xmltv2foltia.replaceepg.1'}); 227 227 my $now = &epoch2foldate(time()); 228 $sth = $dbh->prepare( "SELECT * FROM foltia_epg WHERE enddatetime > ? AND startdatetime < ? AND ontvchannel = ? AND startdatetime > ?");229 228 $sth->execute($foltiastarttime , $foltiaendtime , $ontvepgchannel,$now); 230 229 … … 281 280 sub commitdb{ 282 281 $dbh->{AutoCommit} = 0; 283 $dbh->do('BEGIN');284 282 #print Dumper(\@dbarray); 285 283 my $loopcount = @foltiastarttime; … … 298 296 #&writelog("xmltv2foltia DEBUG : INSERT INTO foltia_epg VALUES ( NULL , $foltiastarttime[$i],$foltiaendtime[$i], $lengthmin[$i], $channel[$i], $title[$i], $desc[$i], $category[$i])"); 299 297 }# end for 300 $dbh-> do('COMMIT');298 $dbh->commit; 301 299 $dbh->{AutoCommit} = 1; 302 300 }#end sub commitdb