I have a foreach loop, I am trying to get total count value which works fine. But the problem is that, most of the hard_disk3 column rows in database contains value "None", I want php to not count where row value is "None".
Here is the php code, what can I do to achieve this?
<?php
$type="systype, hard_disk3";
$typeQuery = $basequery." GROUP BY ".$type;
// Perform the Query
$objDbResultByType = $objDatabase->Query($typeQuery);
$imran9 = array();
foreach ($objDbResultByType as $row) {
$result = "{ label: \"".$row['systype']." ".$row['hard_disk3']."\", y: " .$row['total']." },";
array_push($imran9,$result);
}
$lastIndex = count($imran9)-1;
$lastValue = $imran9[$lastIndex];
$imran9[$lastIndex] = rtrim($lastValue, ',');
?>