/[corp_html]/animal_health.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /animal_health.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Sat Mar 3 12:55:31 2001 UTC revision 1.6 by dpavlin, Thu Apr 5 12:26:33 2001 UTC
# Line 60  if (isset($type) && $type!="any") { Line 60  if (isset($type) && $type!="any") {
60  if (isset($search) && $search!="" && $search!="all") {  if (isset($search) && $search!="" && $search!="all") {
61          $sql_where[]=" (upper(brand) like upper('%$search%') or          $sql_where[]=" (upper(brand) like upper('%$search%') or
62          upper(form) like upper('%$search%') or          upper(form) like upper('%$search%') or
63          upper(generic) like upper('%$search%') or          upper(composition) like upper('%$search%') or
64          upper(description) like upper('%$search%') )          upper(description) like upper('%$search%') )
65          ";          ";
66  }  }
# Line 71  if ($sql_where) { Line 71  if ($sql_where) {
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,have_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]");                          $sth2 = $dbh->prepare("select distinct 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()) {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.26