<?php
$sql="select br_id,day(bill_date) as dx,count(*) as cnt,sum(amnt) as amnt from EHONGDB.dbo.product_binderbill where month(bill_date)=month('$date1') and year(bill_date)=year('$date1')
and status not in ('V') $xstr group by br_id,day(bill_date)";
// echo $sql."<br>";
$rs=$conn->prepare($sql);
$rs->execute();
$arrow=array();
$xarrow=array();
$sumarr=array();
$sumx=array();
 foreach($rs as $row){
    $arrow[$row["br_id"]][$row["dx"]] = $row["cnt"];
  $xarrow[$row["br_id"]][$row["dx"]] = $row["amnt"];
};
?>
