actor.org_unit r;
SQL
+ $self->method_lookup('open-ils.storage.transaction.begin')->run;
actor::org_unit_proximity->db_Main->do($delete_sql);
actor::org_unit_proximity->db_Main->do($insert_sql);
+ $self->method_lookup('open-ils.storage.transaction.commit')->run;
return 1;
}
my @phonev;
if ($pv) {
for my $p ( qw/day_phone evening_phone other_phone/ ) {
- push @ps, "evergreen.lowercase($p) ~ ?";
+ if ($pv =~ /^\d+$/) {
+ push @ps, "evergreen.lowercase(REGEXP_REPLACE($p, '[^0-9]', '', 'g')) ~ ?";
+ } else {
+ push @ps, "evergreen.lowercase($p) ~ ?";
+ }
push @phonev, "^$pv";
}
$phone = '(' . join(' OR ', @ps) . ')';