$query = "SELECT SUM(amount) FROM income_daily";
$sum = mysqli_fetch_row(mysqli_query($con, $query));
echo "Total Income : ". "¢" .$sum[0];
echo '<br>';
echo '-';
echo '<br>';
$query1 = "SELECT SUM(amount) FROM expenses_daily";
$sum = mysqli_fetch_row(mysqli_query($con, $query));
echo "Total Expenses : ". "¢" .$sum[0];
David_139 0 Newbie Poster
alan.davies 185 What's this?
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.