i need to print the sum of counters of unread note for more than one if i have 2 or more person



this code shows to me every student that do not read the notes so I need the counter of these unread to print it how can get the sum of all unread notes ?

 $query=mysql_query("SELECT * FROM students WHERE
parents_id='".$pid."'");
while($r=mysql_fetch_assoc($query)){
echo'<tr>';
echo'<td><b>'.$r['first_name'].'  '.
$r['last_name'].'</b></td>';
echo'<td>'.$r['class_name'].'</td>';
$quer=mysql_query("SELECT count(id) FROM notes  WHERE
student_id='".$r['id']."' AND isread='0' ");
$count=mysql_fetch_array($quer);
$c=$count[0];
echo'<td><b><span
style="color:red;text-align:center;">('.$c.')
'.'UnRread</b></td>';
echo'<td><b>'."<a
href=viewnote.php?viewnote&sid=".$r['id']."&name=".$r['first_name']."&last=".$r['last_name']."'
>View</a>".'</b></td>';
echo'</tr>';

Related to : i need to print the sum of counters of unread note for more than one if i have 2 or more person

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .