<?php   include_once('../config/db.php');   include_once('../config/check.php');
             
  


$query = "           SELECT COUNT(*) ans,a.category,b.name dname  FROM bmember a

                         LEFT JOIN bmtype b ON a.category=b.id
                         group BY category 
                               
                    ";

$result = $conn->query($query);

		    foreach ($result as $row) {
		                                $data[] = $row;
		                             }

print json_encode($data);

///MONTH(b.date)

