- コミット日時:
- 2007/06/06 17:15:09 (18 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/perl/updatem2pfiletable.pl
r54 r57 28 28 $dbh = DBI->connect($data_source,$DBUser,$DBPass) ||die $DBI::error;; 29 29 30 $dbh->{AutoCommit} = 0; 30 31 # ひとまず消す 31 32 $query = "DELETE FROM foltia_m2pfiles "; … … 36 37 $file =~ s/$recfolderpath\///; 37 38 $query = "insert into foltia_m2pfiles values ('$file')"; 38 $sth = $dbh->prepare($query); 39 $sth->execute(); 39 $oserr = $dbh->do($query); 40 40 # print "$file\n"; 41 41 }#while 42 $oserr = $dbh->commit; 42 43 43 44 # foltia_mp4files 44 45 45 # ひとまず消す 46 46 $query = "DELETE FROM foltia_mp4files "; … … 49 49 50 50 @mp4filelist = `find ${recfolderpath}/ | grep MP4`;#by foltia dev ticket #5 http://www.dcc-jpl.com/foltia/ticket/5 51 # find /home/foltia/php/tv/ | grep MP452 53 #/home/foltia/php/tv/1057.localized/mp4/M4V-1057-14-20061016-2345.MP454 #/home/foltia/php/tv/1057.localized/mp4/M4V-1057-15-20061023-2345.MP455 51 56 52 foreach (@mp4filelist) { 57 53 chomp(); 58 54 s/$recfolderpath\///; 59 # 1057.localized/mp4/M4V-1057-14-20061016-2345.MP460 # 1057.localized/mp4/M4V-1057-15-20061023-2345.MP461 55 @fileline = split (/\//); 62 56 $filetid = $fileline[0]; … … 64 58 65 59 $query = "insert into foltia_mp4files values ('$filetid','$fileline[2]')"; 66 $sth = $dbh->prepare($query); 67 $sth->execute(); 68 60 $oserr = $dbh->do($query); 69 61 #print "$filetid;$fileline[2];$query\n" 70 62 # http://www.atmarkit.co.jp/fnetwork/rensai/sql03/sql1.html 71 63 72 64 } 65 $oserr = $dbh->commit; 66