in reply to Undefined value from DBI
Hi,
that's a hint that your line
my $sth = $dbh->prepare($sql);
results in an error assigning undef to $sth.
Without handle attribute RaiseError you have to check EVERY DBI call for errors. So in this case it's probably a simple SQL error.
Change the prepare line to
my $sth = $dbh->prepare($sql) or die "Prepare Error: $DBI::errstr";
Regards
McA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Undefined value from DBI
by Anonymous Monk on Sep 10, 2014 at 17:17 UTC | |
by poj (Abbot) on Sep 10, 2014 at 18:09 UTC | |
by McA (Priest) on Sep 10, 2014 at 19:50 UTC |