Lines 331-337
sub _store_matchpoint {
Link Here
|
331 |
my $matcher_id = $self->{'id'}; |
331 |
my $matcher_id = $self->{'id'}; |
332 |
$sth = $dbh->prepare_cached("INSERT INTO matchpoints (matcher_id, search_index, score) |
332 |
$sth = $dbh->prepare_cached("INSERT INTO matchpoints (matcher_id, search_index, score) |
333 |
VALUES (?, ?, ?)"); |
333 |
VALUES (?, ?, ?)"); |
334 |
$sth->execute($matcher_id, $matchpoint->{'index'}, $matchpoint->{'score'}); |
334 |
$sth->execute($matcher_id, $matchpoint->{'index'}, $matchpoint->{'score'}||0); |
335 |
my $matchpoint_id = $dbh->{'mysql_insertid'}; |
335 |
my $matchpoint_id = $dbh->{'mysql_insertid'}; |
336 |
my $seqnum = 0; |
336 |
my $seqnum = 0; |
337 |
foreach my $component (@{ $matchpoint->{'components'} }) { |
337 |
foreach my $component (@{ $matchpoint->{'components'} }) { |
Lines 343-349
sub _store_matchpoint {
Link Here
|
343 |
$sth->bind_param(2, $seqnum); |
343 |
$sth->bind_param(2, $seqnum); |
344 |
$sth->bind_param(3, $component->{'tag'}); |
344 |
$sth->bind_param(3, $component->{'tag'}); |
345 |
$sth->bind_param(4, join "", sort keys %{ $component->{'subfields'} }); |
345 |
$sth->bind_param(4, join "", sort keys %{ $component->{'subfields'} }); |
346 |
$sth->bind_param(5, $component->{'offset'}); |
346 |
$sth->bind_param(5, $component->{'offset'}||0); |
347 |
$sth->bind_param(6, $component->{'length'}); |
347 |
$sth->bind_param(6, $component->{'length'}); |
348 |
$sth->execute(); |
348 |
$sth->execute(); |
349 |
my $matchpoint_component_id = $dbh->{'mysql_insertid'}; |
349 |
my $matchpoint_component_id = $dbh->{'mysql_insertid'}; |
350 |
- |
|
|