ok now it just print out 2 for every single artical instead of the achual storys comment ammount i think its counting everycomment.
Ok so the logic sould be
count comments Form story_comments Where storys_comments.id = storys.id
so it sould go into the story comment database and count the amount of comments that match the story_id of the comment and display the ammount on screen. Right now it just prints the total ammount of comments.
$num_rows = mysql_query("select * count(omments) from storys_comments, storys where storys.story_id=storys_comments.id");
^ im thinking here it sould be counting the story_id or something
then to display it
printf("<td><a href=\"story_display.php?id=%s&usrname=$usrname\">%s</a></td><td>
<span style=\"TEXT-ALIGN:center\">%s</span></td><td>%s</td><td>%s</td></tr>",
$row["id"], $row["title"], $row["author"], $row["poster"], $num_rows);
IF i put in mysql_result($num_rows, 0)) i get this result
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/fhlinux168/d/dev.cossycomforts.com/user/htdocs/includes-blocks/stories.php on line 67