in reply to difficulty with SQL::Abstract '-in' clauses
It takes an array ref of scalars not an array ref of a scalar with commas (and your single quotes are making it a literal string too: $DocumentReference). :) Try something like this. Note I adjusted it to match what I consider normal/idiomatic syntax-
if ( $document_reference ) { my @docs = split /\|/, $document_reference; if ( @docs > 1 ) { $where{DocumentRef} = { -in => \@docs }; } else { $where{DocumentRef} = $document_reference; } }
Untested. Have fun.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: difficulty with SQL::Abstract '-in' clauses
by Anonymous Monk on Sep 20, 2009 at 09:47 UTC | |
by roboticus (Chancellor) on Sep 20, 2009 at 11:12 UTC | |
by Your Mother (Archbishop) on Sep 21, 2009 at 00:44 UTC |