71 |
|
|
72 |
if (isset($search)) { |
if (isset($search)) { |
73 |
|
|
74 |
$sth = $dbh->prepare("select distinct brand,form,composition,description,type,smpc from vet_products $sql_where"); |
$sth = $dbh->prepare("select distinct brand,form,composition,description,type,smpc from vet_products $sql_where order by brand asc"); |
75 |
$sth->execute(); |
$sth->execute(); |
76 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
77 |
if ($show_animals) { |
if ($show_animals) { |
78 |
$sth2 = $dbh->prepare("select vet_animal_product.animal,name from vet_animal_product,vet_animal where vet_animal_product.animal=vet_animal.animal and smpc=$row[smpc] order by brand asc"); |
$sth2 = $dbh->prepare("select vet_animal_product.animal,name from vet_animal_product,vet_animal where vet_animal_product.animal=vet_animal.animal and smpc=$row[smpc]"); |
79 |
$sth2->execute(); |
$sth2->execute(); |
80 |
unset($animals); |
unset($animals); |
81 |
while ($row2=$sth2->fetchrow_hash()) { |
while ($row2=$sth2->fetchrow_hash()) { |