32 |
} else { |
} else { |
33 |
$dbh->dbh_do("set datestyle='german'"); |
$dbh->dbh_do("set datestyle='german'"); |
34 |
|
|
35 |
$sql="select date,type,current,change,high,low,open from stocks order by date desc limit 2"; |
$sql="select date(date),time(date),type,current,change,high,low,open from stocks order by stocks.date desc limit 2"; |
36 |
$sth = $dbh->prepare("$sql"); |
$sth = $dbh->prepare("$sql"); |
37 |
$sth->execute(); |
$sth->execute(); |
38 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
39 |
$stock[]=$row; |
$stock[]=$row; |
40 |
|
$time=$row[time]; |
41 |
|
$date=$row[date]; |
42 |
} |
} |
43 |
|
|
44 |
$smarty->assign("stock",$stock); |
if ($time == "23:23:23") $time="CLOSE"; |
45 |
|
|
46 |
|
$smarty->assign(array(stock=>$stock, date=>$date, time=>$time)); |
47 |
$main=$smarty->fetch("investor.tpl"); |
$main=$smarty->fetch("investor.tpl"); |
48 |
} |
} |
49 |
$smarty->assign("MAIN",$main); |
$smarty->assign("MAIN",$main); |