[英]update sqlite table with perl
i have the below perl code to update record on sqlite DB我有以下 perl 代码来更新 sqlite DB 上的记录
my $database = 'dbi:SQLite:dbname=my_db.db'; #
my $dbh = DBI->connect($database,"","",{AutoCommit => 1}) || die "Cannot
connect: $DBI::errstr";
my $sql = "update my_table set table_id=51853 where table_id like '%49805%'";
my $sth = $dbh->prepare( $sql );
$sth->execute();
$sth->finish;
$dbh->disconnect();
it seems the code works but the update is not saved on the DB could someone help with this issue?似乎代码有效,但更新未保存在数据库中,有人可以帮助解决这个问题吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.