SELECT COUNT(*) WHERE date='$today'
Posted: 29 Oct 2017, 00:36
Dear admin i try to add a counter but
i want to have the data from only
the current date into it...
This code is not working & what do i do wrong ???
i want to have the data from only
the current date into it...
This code is not working & what do i do wrong ???
Code: Select all
<?php
include('connection.php');
$today = date('Y-j-n');
$result = $track->query("SELECT COUNT(*) FROM `visitor_tracker` WHERE date='$today' ");
$row = $result->fetch_row();
echo 'Total Visits ', $row[0];
?>