in reply to DBI - selectcol_arrayref not working
Your $query is failing and you don't have RaiseError set on the DBI handle. Store the result to another variable and check if it's undef or not; if it is, check $dbh->errstr to see what went wrong.
my $res = $dbh->selectcol_arrayref( $query ); unless( defined $res ) { die "Error executing '$query': ", $dbh->errstr, "\n"; } my $welcome = pop @{ $res };
Also of use may be using the trace method on your handle to watch exactly what's being sent back and forth to your underlying database.
Update: Heh. So . . . do you perhaps think you should check if you're getting undef back?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI - selectcol_arrayref not working
by PaulBerry (Novice) on Dec 20, 2006 at 20:01 UTC | |
|
Re^2: DBI - selectcol_arrayref not working
by PaulBerry (Novice) on Dec 20, 2006 at 19:57 UTC |