in reply to Re: Re: Re: Placeholders, safety and the relative unimportance of efficiency
in thread SQL in Perl and setting variables
my $dbh = DBI->connect('...', 'user','passwd', {PrintError=>0, RaiseError=>1}); my $sql = <<EOT; select ... from .. where exe_c = 'N' EOT my $sel_h = $dbh->prepare($sql); $sql = <<EOT; update ... set exe_c = 'N' where rowid = ? EOT my $upd_h = $dbh->prepare($sql); $sel_h->execute; $sel_h->bind_columns(...); while ($sel_h->fetch) { ... $upd_h->execute($rowid); } $dbh->disconnect;
------------ ooo O\O ooo tilly was here :,(
|
|---|