in reply to variable type
my $sth = $dbh->prepare(q{ INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) }) or die $dbh->errstr; while (<>) { chomp; my ($product_code, $qty, $price) = split /,/; $sth->execute($product_code, $qty, $price) or die $dbh->errstr; } $dbh->commit or die $dbh->errstr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: variable type
by chromatic (Archbishop) on Dec 07, 2006 at 19:16 UTC |