5) { $postno=5; } } else { $sql="SELECT id FROM $dbtable2 where par2=$pageid"; $result=mysql_query($sql); $postno=mysql_num_rows($result); } if ($postno>0) { for ( $counter = 1; $counter <= $postno; $counter += 1) { $numpost=($numpost+1); include 'includes/blog-posts.php'; } } ?>