The below code displays correctly, I need an "IF" statement that prevents displaying rows with 0% in the percent column and I've tried several conditions. None are working.
I only want to display rows that has at least 1% in the percent column.
Here is the code:
$result = mysql_query("SELECT user8, concat(round(count( * ) *100 /
(SELECT count( * )
FROM `lm_users`)) , \"%\")
AS percent
FROM `lm_users` GROUP BY user8
");
while ($row = mysql_fetch_array($result))
for ($i=0; $i<mysql_num_fields($result); $i++)
echo $row[$i] . " ";
echo "<br>";
Any help would be appreciated.