-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1.php
32 lines (29 loc) · 1021 Bytes
/
1.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
<?php
include "db_connect.php";
if(isset($_POST['submit']))
{
$t = $_POST['tname'];
$str=$_POST['date1'];
$sql1 = "SELECT SalesCount FROM `tproductsalesdataprocessed` WHERE SubmittedDate='".$str."' AND Team_Name = '".$t."'";
$response = array();
$temp =array();
array_push($temp,"Sales");
while($row=mysqli_fetch_array($res)){
array_push($temp,$row["ProductCode"]);
}
array_push($response,$temp);
while($row1=mysqli_fetch_array($subid)){
$sql = "SELECT * FROM `tproductsalesdataprocessed` WHERE Team_Name = '".$row1["Team_Name"]."'";
$r = mysqli_query($con,$sql) or die("error3".mysqli_error($con));
$t = array();
array_push($t,$row1["Team_Name"]);
while($row2=mysqli_fetch_array($r)){
array_push($t,intval($row2["SalesCount"]));
}
array_push($response,$t);
}
echo json_encode($response);
print_r($response);
//exit(0);
}
?>