I'm trying to calculate the total number of tokens collected instead of the number of records in the mysql db. Although I have already put the SUM function in the query but it still counts the no. of rows.
<?php
$conn = mysqli_connect(server, dbuser, dbpw, db);
$query = " SELECT SUM(nooftokensused) FROM bidding WHERE biddedon >= DATE_FORMAT(CURRENT_DATE(), '%Y-01-01') GROUP BY biddingid";
$query_run = mysqli_query($conn, $query);
$row = mysqli_num_rows($query_run);
echo '<h1>'.$row.'</h1>';
?>