/[corp_html]/inc/stocks.inc
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/stocks.inc

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

revision 1.3 by dpavlin, Fri Apr 6 06:41:47 2001 UTC revision 1.4 by dpavlin, Tue Feb 5 10:03:51 2002 UTC
# Line 10  Line 10 
10    
11          $dbh->dbh_do("set datestyle='german'");          $dbh->dbh_do("set datestyle='german'");
12    
13          $sth2 = $dbh->prepare("select type from stocks_order order by ordinal");          $sql="select date(date),time(date),stocks.type as type,current,change,high,low,open from stocks order by stocks.date desc limit 1";
14          $sth2->execute();          $sth = $dbh->prepare("$sql");
15          while ($row2=$sth2->fetchrow_hash()) {          $sth->execute();
16            if ($row=$sth->fetchrow_hash()) {
17                  $sql="select date(date),time(date),stocks.type as type,current,change,high,low,open from stocks where stocks.type='$row2[type]' order by stocks.date desc limit 1";                  $row[type]=$row[type];
18                  $sth = $dbh->prepare("$sql");                  $row[current]=sprintf("%.2f ",$row[current]);
19                  $sth->execute();                  $row[high]=sprintf("%.2f",$row[high]);
20                  if ($row=$sth->fetchrow_hash()) {                  $row[low]=sprintf("%.2f",$row[low]);
21                          $stock[]=$row;                  $row[open]=sprintf("%.2f",$row[open]);
22                          $time=$row[time];                  $row[change]=sprintf("%.2f",$row[change]);
23                          $date=$row[date];                  $stock[]=$row;
24                  }                  $time=$row[time];
25                    $date=$row[date];
26          }          }
27    
28          if ($time == "23:23:23" || $time == "21:21:21" || $time == "22:21:21" ) $time="CLOSE";          if ($time == "23:23:23" || $time == "21:21:21" || $time == "22:21:21" ) $time="CLOSE";

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

  ViewVC Help
Powered by ViewVC 1.1.26