时间:2021-07-01 10:21:17 帮助过:5人阅读
include_once 'DB_connmssql.php';
header("Content-Type:text/html;charset=utf-8");
$sql_initbest="
select outdate,SUM(nb*endprice) sales from BI_sale
where endprice<>0
group by outdate";
$query = mssql_query($sql_initbest);
while($row=mssql_fetch_array($query)){
array_push($result["data"] , $row);
}
echo json_encode($result);
?>
while($row=mssql_fetch_array($query)){
$result["data"][] = array( strtotime($row["outdate"]).'000', $row["sales"] );
}
echo json_encode($result);