Revision bc40bcab
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/Controller/TopQuickSearch/Contact.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use SL::Controller::CustomerVendor; |
7 | 7 |
use SL::DB::Vendor; |
8 |
use SL::DBUtils qw(selectfirst_array_query); |
|
8 |
use SL::DBUtils qw(selectfirst_array_query like);
|
|
9 | 9 |
use SL::Locale::String qw(t8); |
10 | 10 |
|
11 | 11 |
sub auth { 'customer_vendor_edit' } |
... | ... | |
22 | 22 |
my $result = SL::DB::Manager::Contact->get_all( |
23 | 23 |
query => [ |
24 | 24 |
or => [ |
25 |
cp_name => { ilike => "%$::form->{term}%" },
|
|
26 |
cp_givenname => { ilike => "%$::form->{term}%" },
|
|
27 |
cp_email => { ilike => "%$::form->{term}%" },
|
|
25 |
cp_name => { ilike => like($::form->{term}) },
|
|
26 |
cp_givenname => { ilike => like($::form->{term}) },
|
|
27 |
cp_email => { ilike => like($::form->{term}) },
|
|
28 | 28 |
], |
29 | 29 |
cp_cv_id => [ \'SELECT id FROM customer UNION SELECT id FROM vendor' ], |
30 | 30 |
], |
Auch abrufbar als: Unified diff
(I)LIKE-Argumente immer mit Funktion SL::DBUtils::like erstellen