<?php
// Make a MySQL Connection
$query = "SELECT excel , count(excel) As Sumexcel FROM customer WHERE excel = 'STAD BY excel ";$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
echo $row["Sumexcel"];
?>
<?php
// Make a MySQL Connection
$query = "SELECT AD, count(offstd) As Sumoffstd FROM customer WHERE offstd = 'AD'GROUP BY offstd ";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
echo $row["Sumoffstd"];
?>
<?php
// Make a MySQL Connection
$query = "SELECT offstd, SUM(offstd) As Sumoffstd FROM customer WHERE class= 'AD'GROUP BY class";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
echo $row["Sumoffstd"];
?>