$dt1 = $_GET["dt1"];
$dt2 = $_GET["dt2"];
//Download data Stock,Broker, dari tgl s.d tgl
if ( isset($_GET["dt1"]) && isset($_GET["dt2"]) ) {
$db = new mysqli(‘localhost’, ‘root’, ”, ‘mstock’);
//Stock EOD
$sql = “select * from stock_eod “;
$sql = $sql. ” where stk_date>=’” .$dt1. “‘ and stk_date<=’” .$dt2. “‘ and stk_code is not null” ;
$values =$db->query($sql);
flush();
//$values->bind_result($stk_date, $stk_code);
$rows = $values->num_rows;
echo(“”);
echo (“
echo (“
if ($rows>0) {
while ($rowd = $values->fetch_array(MYSQLI_NUM)){
echo (“
$finfo = mysqli_fetch_fields($values);
$i=0;
foreach ($finfo as $val) {
$d = str_replace(“&”,”dan”,$rowd[$i]);
echo (“<$val->name>$d</$val->name>”);
$i = $i + 1;
}
echo (“
}
}
echo (“
”);
echo (“”);
$values->close();
$db->close();
}
?>
0 komentar:
Posting Komentar