Die Fehlermeldung
'DBD::Pg::st execute failed: ERROR: stack depth limit exceeded' wird durch
Anpassung des queries vermieden
statt:
WHERE (trans_id = 2088 OR trans_id=2090 OR trans_id=2092 ... (10000 fach)
nun:
WHERE (trans_id = 2088 OR trans_id IN (2090,2092,2094, ...
my @ids = grep { $_ * 1 } selectall_array_query($form, $dbh, $query);
my $daten .= shift @ids;
- $daten .= join '', map { " OR trans_id = $_" } @ids;
-
+ if (scalar(@ids) > 0 ) {
+ $daten .= ' OR trans_id IN (' . join(',', @ids) . ')';
+ }
my ($sort, $sortby) = split(/\-\-/, $form->{order});
$sort =~ s/.*\.(.*)$/$1/;