Code:
$sumgiveaways = $vbulletin->db->query_first("SELECT SUM(field6) AS GiveTotal FROM " . TABLE_PREFIX . "thread");
$giveaways = $sumgiveaways['GiveTotal'];
I was able to use the code above to add up all the values in field6 now i would like to count how many rows in field6 that are not equal to 0.
Im really new at this stuff and would like some help with an example so i can understand the logic.
Thanks