I need to show total amount only for today. Tomorrow only for tomorrow and etc.. Here is my code:
<div class="num" data-postfix="" data-duration="1500" data-delay="0">
<?php
include ("db_connection.php");
$sql=mysqli_query($mysqli,"SELECT SUM(deposit_amount - deposit_charge)
AS 'deposit_today'
FROM incomes
WHERE date_time >= DATE_SUB(NOW(), INTERVAL 1 DAY)");
while($arow=mysqli_fetch_array($sql)){
?>
<p> <?php echo $arow['deposit_today']; ?> </p>
<?php
}
?>
</div>
But it show me only SUM(deposit_amount - deposit_charge)
for all dates.