I have the following query and I want to print the "total" I want to print the total like I print "num_rows" How can I do that ?
$stmt = $conn->prepare("SELECT SUM( total) AS total FROM money");
$stmt->execute();
$stmt->store_result();
print $stmt->total;
my table structure are like this
id user monthly_pay total
1 Adam 1500 1500
2 Erik 1500 1500
3 Mark 1500 1500
4 Gusta 1500 1500
5 Mike 1500 1500
I want to view the total "75000"