I have a field ‘Category2ID’ that lists 0 or the category ID. When I list the values of the array it lists
0
0
0
402
402 is the category2ID I need. Is it possible to not output the 0 values?
this is my code now:
[php]
$sqlIndustry = “SELECT Category2ID FROM products order by Category2ID asc”;
$resultIndustry = mysql_query($sqlIndustry, $conn);
if (mysql_num_rows($resultIndustry) == 0) {
//do something here
} else {
while($row = mysql_fetch_array($resultIndustry)) {
echo "
";
}
}
[/php]