i wanna make a simple think:
i have comments on my news and its like this:
comment.news_id = news.comment
i wanna count the comments inside a loop.. i m making a while loop to display news... and i want to count the number of comments for each news id.. i tried this:
while($count_coments = mysql_fetch_array($count_result)) {
if ($count_coments['demo'] == $results['demo_id']) {
$comentarios++;
}
But its returning just the FIRST comments number.. it just count the first news and returns 0 to the others 🙁
Anyone could help please?