in reply to Use DBI to select and return multiple database entries

What does this print:
my $sql = "select * from Directory"; my $sth = $dbh->prepare($sql); $dbh->execute(); print "$_\n" for @{$sth->{NAME}};
Is 'domain', and 'path' in the list? Is it properly upper/lower cased? Do you need to set FetchHashKeyName on the handle?

BTW, with RaiseError set, the whole "if (!$sth) {...}" block you have is useless.

Replies are listed 'Best First'.
Re^2: Use DBI to select and return multiple database entries
by jayto (Acolyte) on Jul 16, 2012 at 19:44 UTC

    If you meant $sth->exceute, it returns: dir_id path domain expires

    domain and path were properly cased and im not sure what FetchHashKeyName is, but you made it return something from the table, so progress is being made