in reply to Re^4: Multiple queries on DBI corresponding to multiple csv files?
in thread Multiple queries on DBI corresponding to multiple csv files?
That piece of code is returning only the last id. How to get all ids using it?
I have changed it for the below code but now it is returning only the first element. Can you help me, please?
if ($id[0] eq "") { my $sql = "SELECT DISTINCT id FROM mytable WHERE active = ?"; $id[0] = @{$dbh->selectall_arrayref($sql,undef,'no')}; #@id = map{ $_->[0] } @$ref; print join (", ", @id), "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Multiple queries on DBI corresponding to multiple csv files?
by hippo (Archbishop) on Feb 21, 2019 at 11:18 UTC | |
by jtech (Sexton) on Feb 21, 2019 at 12:38 UTC | |
by poj (Abbot) on Feb 21, 2019 at 13:00 UTC | |
by jtech (Sexton) on Feb 21, 2019 at 12:53 UTC |