/[health_html]/inc/pgSimptomi.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 /inc/pgSimptomi.php

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

revision 1.4 by ravilov, Tue Sep 25 15:38:04 2001 UTC revision 1.5 by ravilov, Fri Sep 28 23:34:37 2001 UTC
# Line 57  Line 57 
57                  while ($row = $sth->fetchrow_array()) array_push($aliasi, MyEscape($row[0]));                  while ($row = $sth->fetchrow_array()) array_push($aliasi, MyEscape($row[0]));
58                  $sth->finish();                  $sth->finish();
59                  $tpl->assign("aliases", $aliasi);                  $tpl->assign("aliases", $aliasi);
60                  $sql = "SELECT bolesti.bolest_id, bolesti.naziv, simptomi_bolesti.vjerojatnost FROM bolesti, simptomi_bolesti WHERE (bolesti.bolest_id = simptomi_bolesti.bolest_id) AND (simptomi_bolesti.simptom_id = $sid) ORDER BY simptomi_bolesti.vjerojatnost, bolesti.naziv";                  $sql = "SELECT bolesti.bolest_id, bolesti.is_bolest, bolesti.naziv, simptomi_bolesti.vjerojatnost FROM bolesti, simptomi_bolesti WHERE (bolesti.bolest_id = simptomi_bolesti.bolest_id) AND (simptomi_bolesti.simptom_id = $sid) ORDER BY simptomi_bolesti.vjerojatnost, bolesti.naziv";
61                  $sth = $dbh->prepare($sql);                  $sth = $dbh->prepare($sql);
62                  if (!$sth) error("Cannot prepare query: \"$sql\"");                  if (!$sth) error("Cannot prepare query: \"$sql\"");
63                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");                  if (!$sth->execute()) error("Cannot execute query: \"$sql\"");
64                  $bolesti = array();                  $bolesti = array();
65                  $uobicajeno = $povremeno = $rijetko = false;                  $uobicajeno = $povremeno = $rijetko = false;
66                  while ($row = $sth->fetchrow_array()) {                  while ($row = $sth->fetchrow_array()) {
67                          list($bid, $naziv, $vjer) = $row;                          list($bid, $is, $naziv, $vjer) = $row;
68                          if ($vjer == 1) $uobicajeno = true;                          if ($vjer == 1) $uobicajeno = true;
69                          if ($vjer == 2) $povremeno = true;                          if ($vjer == 2) $povremeno = true;
70                          if ($vjer == 3) $rijetko = true;                          if ($vjer == 3) $rijetko = true;
71                            if ($is[0] == "f" || $is[0] == "F") unset($is);
72                          array_push($bolesti, array(                          array_push($bolesti, array(
73                                  "id" => "$bid-0",                                  "id" => "$bid-0",
74                                    "is" => $is ? true : false,
75                                  "naziv" => escape_quote($naziv),                                  "naziv" => escape_quote($naziv),
76                                  "vjerojatnost" => $vjer                                  "vjerojatnost" => $vjer
77                          ));                          ));

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.26