Without count find total sum in PHP MYSQL while in while loop


Calculate row sum variable total and count without used mysql count queary in mysql php with while loop and while loop with table 2 or 3 while loop used php mysql queries 

How to count column row values with MySQL queries ount(*)  mysql - Calculate row SQL COUNT for total number of records in mysql table php sum variable in while loop


How to Get and count number of rows in result mysql_num_rows

Count and sum in mysql and php



$techwiteachtechdda = mysql_query("SELECT * FROM managebatchtimeadd where roomidlist = '".$selectroomid."' ");


   $managelist = $techwicddersbr['managebatchid'];

$techwicddda = mysql_query("SELECT * FROM manageadminbatchlist where batchcode = '".$managelist."' ");

$checknonn = mysql_num_rows($techwicddda);

echo $checknonn;

 $summgbta = $summgbta + $checknonn;

//echo $summgbta;


//$techwicddersbr = mysql_fetch_array($techwicddda);

     // $summgbta = $summgbta + $checknonn;

//echo $summgbta;

    //echo $techwicddersbra['adminid'];

//echo $techwicddersbra['batchcode'];



echo $summgbta;