<?php
$connection = new mysqli("localhost","root","", "inventory");
$dash_sales_query = "SELECT sum(Total) FROM salesp";
$dash_sales_query_run = mysqli_query($connection,$dash_sales_query) or die(mysqli_error());
if($sales_total = mysqli_num_rows($dash_sales_query_run))
{
echo '<span class="bold">'.$sales_total.'</span>';
}
else
{
echo '<span class="bold">No Data</span>';
}
?>
hi im beginner and i making a analytics for the system in websites. i really want to show the total price of "total (data)". so i sum it as you can see, but it shows only 1. what is my error?? thankyou very much.