$query_count_ghost_hunt = "SELECT sum(CubeCart_inventory.stock_level) FROM CubeCart_inventory WHERE CubeCart_inventory.cat_id = 6"; $Quantity_count_ghost_hunt = mysql_query($query_count_ghost_hunt, $Shopping) or die(mysql_error()); $sum_count_ghost_hunt = mysql_num_rows($Quantity_count_ghost_hunt);