eimaan has asked for the wisdom of the Perl Monks concerning the following question:
Hey Im coding a perl script which needs to get data from a database. But when I get a return value its comes back in an array so i dereference it. Yet it still prints out nothing. I ran the command in sqlplus and it worked there without issue. Im not sure how to solve this
OUTPUT (literally nothing):my $sth = $dbh->prepare("select XMLRECORD from F_COMPANY") or die "Couldnt prepare statement: " . $dbh->errstr; $sth->execute(); # loop through the returned data while( my ($row) = $sth->fetchrow_array()){ print "@$row\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fetchrow_array returns an empty array
by choroba (Cardinal) on Jun 28, 2022 at 22:44 UTC | |
by eimaan (Initiate) on Jun 28, 2022 at 22:55 UTC | |
by choroba (Cardinal) on Jun 29, 2022 at 06:44 UTC | |
|
Re: fetchrow_array returns an empty array
by ait (Hermit) on Jun 29, 2022 at 18:07 UTC | |
|
Re: fetchrow_array returns an empty array
by Marshall (Canon) on Jun 29, 2022 at 18:28 UTC |