|
Lines 169-175
C<import_biblios> tables of the Koha database.
Link Here
|
| 169 |
=cut |
169 |
=cut |
| 170 |
|
170 |
|
| 171 |
sub BreedingSearch { |
171 |
sub BreedingSearch { |
| 172 |
my ($title,$isbn,$z3950random) = @_; |
172 |
my ($search,$isbn,$z3950random) = @_; |
| 173 |
my $dbh = C4::Context->dbh; |
173 |
my $dbh = C4::Context->dbh; |
| 174 |
my $count = 0; |
174 |
my $count = 0; |
| 175 |
my ($query,@bind); |
175 |
my ($query,@bind); |
|
Lines 185-196
sub BreedingSearch {
Link Here
|
| 185 |
$query .= "z3950random = ?"; |
185 |
$query .= "z3950random = ?"; |
| 186 |
@bind=($z3950random); |
186 |
@bind=($z3950random); |
| 187 |
} else { |
187 |
} else { |
|
|
188 |
$search =~ s/(\s+)/\%/g; |
| 188 |
@bind=(); |
189 |
@bind=(); |
| 189 |
if ($title) { |
190 |
if ($search) { |
| 190 |
$query .= "title like ?"; |
191 |
$query .= "title like ? OR author like ?"; |
| 191 |
push(@bind,"$title%"); |
192 |
push(@bind,"%$search%", "%$search%"); |
| 192 |
} |
193 |
} |
| 193 |
if ($title && $isbn) { |
194 |
if ($search && $isbn) { |
| 194 |
$query .= " and "; |
195 |
$query .= " and "; |
| 195 |
} |
196 |
} |
| 196 |
if ($isbn) { |
197 |
if ($isbn) { |
| 197 |
- |
|
|