PHP - Excluding blank rows when printing a table
<p>The code below works great.  It prints out items in a MySQL database as an HTML table.  However, the database has entries where the first column (the variable "site") is blank.  How can I have this table exclude rows / entries where "site" is blank?</p>

<pre><code>$result=mysql_query("SHOW TABLES FROM database LIKE '$find'")
or die(mysql_error());


if(mysql_num_rows($result)&gt;0){
while($table=mysql_fetch_row($result)){
print "&lt;p class=\"topic\"&gt;$table[0]&lt;/p&gt;\n";
$r=mysql_query("SELECT * , itemsa - itemsb AS itemstotal FROM `$table[0]` ORDER BY itemstotal DESC");



print "&lt;table class=\"navbar\"&gt;\n";
while($row=mysql_fetch_array($r)){


$itemstotal = $row['itemsa'] - $row['itemsb']; 

print "&lt;tr&gt;";


print "&lt;td class='sitename'&gt;".'&lt;a type="amzn" category="books" class="links2"&gt;'.$row['site'].'&lt;/a&gt;'."&lt;/td&gt;";

print "&lt;td class='class1'&gt;".'&lt;span class="class1_count" id="class1_count'.$row['id'].'"&gt;'.number_format($itemstotal).'&lt;/span&gt;'."&lt;/td&gt;";
print "&lt;td class='selector'&gt;".'&lt;span class="button" id="button'.$row['id'].'"&gt;'.'&lt;a href="javascript:;" class="cell1" id="'.$row['id'].'"&gt;'.Select.'&lt;/a&gt;'.'&lt;/span&gt;'."&lt;/td&gt;";
}
print "&lt;/tr&gt;\n";
}
print "&lt;/table&gt;\n";



}
else{
print "";
}
</code></pre>
