#! c:/perl/bin/perl.exe my $filePath = "D://malware//ixigua.exe"; print 'insert_id=',$id, "/n"; warn( $DBI::errstr ) if $DBI::err; ================================================
注释: 若数据库插入语句不用参数预留,操作就失败,原因没有找到? my $insertStr = "insert into `SIMPLE_BODY` ( SIMPLE_SIZE, SIMPLE_BODY) values( $fileLen, $data);"; #不预留参数而直接填充 my $sth = $dbh->prepare( $insertStr ) or die("Cannot prepare statement:", $dbh->errstr(),"/n"); my $rc = $sth->execute() or die("Cannot execute statement:", $sth->errstr(), "/n"); |
Perl: 向mysql数据库插入二进制字段
最新推荐文章于 2024-05-01 15:53:09 发布
Perl: 向mysql数据库插入二进制字段, 并返回所插入记录的自动增长字段的值
2007-10-27 13:47