There is a table with the date in the format Ymd H:i:s (VARCHAR) "add_date"
The id
users who made the entry in this table is "adder_id"
.
I try to count through COUNT()
number of unique "adder_id"
in the interval minus one hour.
$current_date = date("Ymd H:i:s"); $current_date_hour = date( 'Ymd H:i:s', time()+(-1*60*60) );
I try and so and so. And through GROUP BY adder_id
.
For example, initially tried to get the desired value through:
SELECT COUNT(*) FROM `note_block` WHERE `add_date` < '".$current_date."' AND `add_date` > '".$current_date_hour."' GROUP BY `adder_id`
or
SELECT COUNT(*) FROM `note_block` WHERE `add_date` > '".$current_date_hour."' GROUP BY `adder_id`
But the meter displays anything but the expected number. = (