-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bill Analysis.php
36 lines (27 loc) · 917 Bytes
/
Bill Analysis.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?PHP
include("toconnect.php");
$query = "call billsGraph();";
$result = mysqli_query($connection, $query);
if(!$result)
echo mysqli_error($connection);
$chart_data = '';
while($row = mysqli_fetch_array($result))
{
$chart_data .= "{ Bill_id:'".$row["Bill_id"]."', Order_id:".$row["Order_id"].", Customer_id:".$row["Customer_id"].", Total_Amount:".$row["Total_Amount"]."}, ";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>chart with PHP & Mysql | lisenme.com </title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
</head>
<body>
<br> </br>
<div id="chart"></div>
</div>
</body>
</html>