Count number of rows
<p>Hello this here is my code</p>

<pre><code>$query['2'] = mysql_query("SELECT DISTINCT site FROM logs") or die(mysql_error());

while ($row = mysql_fetch_assoc($query['2'])) {
    if (!$row['site'] == NULL) {
        echo "&lt;a href='http://".$row["site"]."' target='_BLANK'&gt;".$row["site"]."&lt;/a&gt;  &lt;a href='./" . basename($_SERVER[PHP_SELF]) . "?site=" . $row["site"] . "'&gt; (View logs)&lt;/a&gt;
        &lt;a href='./" . basename($_SERVER[PHP_SELF]) . "?action=exportall&amp;site=" . $row['site'] . "'&gt;(Dump to file)&lt;/a&gt;
        &lt;a href='./" . basename($_SERVER[PHP_SELF]) . "?action=delete&amp;site=" . $row['site'] . "'&gt;(Delete)&lt;/a&gt;
        &lt;br&gt;";
    }
}
</code></pre>

<p>This gives the output of </p>

<blockquote>
  <p>test.com (View logs) (Dump to file) (Delete) </p>
</blockquote>

<p>I would like it to be this</p>

<blockquote>
  <p>www.iraceonline.com (View logs) (Dump to file) (Delete) (26 rows)</p>
</blockquote>

<p>Some how by adding a code like this into the code above
<code>mysql_num_rows(mysql_query()</code></p>

<p>It's a hard question to ask. but I think some would understand.</p>

<p><strong>------------------------------------------------------------------------------------------------------------------------------------</strong></p>

<h2><strong>QUESTION HAS BEEN SOLVED! - Thanks everyone for trying to help me!</strong></h2>

<p>The code needed was this below I figured it out with some simple common sense.</p>

<pre><code>while ($row = mysql_fetch_assoc($query['2'])) {
    if (!$row['site'] == NULL) {
        $numSites = $row['site'];
        echo "&lt;a href='http://".$row["site"]."' target='_BLANK'&gt;".$row["site"]."&lt;/a&gt;  &lt;a href='./" . basename($_SERVER[PHP_SELF]) . "?site=" . $row["site"] . "'&gt; (View logs)&lt;/a&gt;
        &lt;a href='./" . basename($_SERVER[PHP_SELF]) . "?action=exportall&amp;site=" . $row['site'] . "'&gt;(Dump to file)&lt;/a&gt;
        &lt;a href='./" . basename($_SERVER[PHP_SELF]) . "?action=delete&amp;site=" . $row['site'] . "'&gt;(Delete)&lt;/a&gt;
        (".mysql_num_rows(mysql_query("SELECT site FROM logs WHERE site='$numSites'")).")
        &lt;br&gt;";
    }
}
</code></pre>

<p>So it was this here - </p>

<pre><code>mysql_num_rows(mysql_query("SELECT site FROM logs WHERE site='$numSites'"))
</code></pre>
