I have the following code which keeps displaying 0 although rows are being inserted every day, i need it to work so that it finds what has been added today.
SELECT count(distinct id) AS today
FROM exchange
WHERE time >= date_sub(now(), interval 0 day)
Thanks
today means any time after 00:00 and format is: time();
I guess that
`time`is atimestampcolumn andidis the Primary Key of the table (so no need to count distinct ids, just count rows):