grabbing article id post
<p>For some reason, this isn't working, but not sure why. I'm trying to grab the comment id on how many comments are in the database, but it's showing "0". When clearly I see comments. </p>

<p>Visit live: <a href="http://www.krissales.me/#/media/articles" rel="nofollow">http://www.krissales.me/#/media/articles</a></p>

<p>If you click on the article link, it'll show how many comments on that page, but not on the page I want it to show on. </p>

<p>I'm pretty sure it has something to do with the:</p>

<blockquote>
  <p>$amount_get = mysql_query("SELECT * FROM comment WHERE id='" .
  mysql_real_escape_string($_GET['id']) . "'");         $comments =
  mysql_num_rows($amount_get);</p>
</blockquote>

<p>article.php:</p>

<pre><code>&lt;?php

        $amount_get = mysql_query("SELECT * FROM comment WHERE id='" . mysql_real_escape_string($_GET['id']) . "'"); 
        $comments = mysql_num_rows($amount_get);            

        $grab = mysql_query("SELECT * FROM articles WHERE id='" . mysql_real_escape_string($_GET['id']) . "' LIMIT 1");    
        $grab = mysql_query("SELECT id, news_title, news_content, news_author, news_day, news_month, news_year, news_date FROM articles ORDER BY id DESC limit 3"); 
        $news_day =$row['news_day'];
        $news_month =$row['news_month'];
        $news_year =$row['news_year'];


        if (mysql_num_rows($grab)==0) {
        echo "&lt;div class='alert alert-note-x'&gt;Sorry, it looks like their are no articles posted!&lt;/div&gt;";
    }
        while($row = mysql_fetch_array($grab)){

    ?&gt;

    &lt;div class="post-container"&gt;
        &lt;div class="post"&gt;
        &lt;div class="left"&gt;
        &lt;div class="date"&gt;&lt;span class="day"&gt;&lt;?php echo $row['news_day'] ?&gt;&lt;/span&gt; &lt;span class="month"&gt;&lt;?php echo $row['news_month'] ?&gt;&lt;/span&gt; &lt;span class="year"&gt;&lt;?php echo $row['news_year'] ?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
        &lt;div class="postcontent"&gt;&lt;h5 class="posttitle"&gt;&lt;a href="#/media/&lt;?php echo $row['id'] ?&gt;.&lt;?php echo stripslashes(str_replace(" ", "-", $row['news_title'])); ?&gt;"&gt;&lt;?php echo stripslashes($row['news_title']); ?&gt;&lt;/a&gt;&lt;/h5&gt;                       
            &lt;p&gt;The content for this article will be posted here shortly, i need to edit some PHP that limits the chars for this section&lt;/p&gt;
            &lt;p&gt;Comments (&lt;?php echo $comments ?&gt;)&lt;/p&gt;
            &lt;/div&gt;
    &lt;/div&gt;​
    &lt;/div&gt;  

  &lt;?php } ?&gt;
</code></pre>
