in reply to DBI execute is not failing when placeholder values are not supplied
You need to actually check the return value from the execute call to see if it failed.
... $sth->execute( @ARGV ) or die "Error executing SQL: " . $sth->errstr . "\n"; ...
Another alternative would be to check if there actually are arguments in @ARGV and die with a usage message if there aren't.
die "usage: $0 [temp]\n" unless @ARGV == 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI execute is not failing when placeholder values are not supplied
by davorg (Chancellor) on Oct 24, 2001 at 19:37 UTC |