i want to get the result of my count query in 2 table
my table :
$userfans=mysql_query("select *from fans where id_userfans='$_SESSION[id_user]' and level='umum' limit 1");
while($oinf=mysql_fetch_array($userfans)){
$coinp=mysql_query("select * from fans_news where id_userf='$_SESSION[id_user]' and id_fans='$oinf[id_fans]' and status='Y'");
$koinp=mysql_num_rows($coinp);
while($oinp=mysql_fetch_array($coinp)){
$comentar=mysql_query("select * from fans_comment,user where fans_comment.id_newsfans='$oinp[id_newsfans]'
and fans_comment.id_usercf!='$_SESSION[id_user]' and fans_comment.id_usercf=user.id_user ");
$comme=mysql_num_rows($comentar);
echo" ($comme) </br>";
}
}
and the result :
(4)
(2)
(2)
(0)
(1)
(0)
(0)
(1)
(0)
(0)
but i want to calculate that count result. become -->10
anyone can help me
im so confuse..