9 $main::lxdebug->enter_sub();
14 my $myconfig = \%main::myconfig;
15 my $form = $main::form;
17 my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig);
23 if ($params{link} =~ '%') {
24 push @where, "c.link LIKE ?";
25 push @values, $params{link};
28 push @where, "(c.link = ?) OR (c.link LIKE ?) OR (c.link LIKE ?) OR (c.link LIKE ?)";
29 push @values, $params{link}, '%:' . $params{link} . ':%', '%:' . $params{link}, $params{link} . ':%';
33 my $where = scalar @where ? 'WHERE ' . join(' AND ', map { "($_)" } @where) : '';
36 qq|SELECT c.id, c.accno, c.description, c.link
41 my $charts = selectall_hashref_query($form, $dbh, $query, @values);
43 $main::lxdebug->leave_sub();