in reply to Loader script - Design question
You don't need selectall_hashref if you're just looking at one record, which is what you should be doing if you have an ID. You need selectrow_hashref.
It might be useful if you could say what you mean by "the result is messed"
The selectrow_hashref should give you something like:
$ref = { 'column_1' => 'foo', 'column_2' => 'bar', 'id' => 12345 };
At which point you can just check whether your column_1 from the CSV file matches $ref->{column_1} etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Loader script - Design question
by artanisace (Initiate) on Feb 23, 2016 at 12:38 UTC | |
by poj (Abbot) on Feb 23, 2016 at 12:54 UTC | |
by artanisace (Initiate) on Feb 23, 2016 at 13:14 UTC | |
by poj (Abbot) on Feb 23, 2016 at 13:56 UTC | |
by artanisace (Initiate) on Feb 23, 2016 at 14:18 UTC |