Search Posts

How to count all records that have todays due date?

how to – How to count all records that have todays due date?

So I need to count all records from my database that have todays due_date.
I was looking at w3shool and did some googling, but did not found anything that would work for me. It seems that I should use COUNT.

But if I do something like this:

SELECT COUNT (id) FROM tasks WHERE due_date = CURDATE

I get an error:

SELECT COUNT (id) FROM tasks WHERE due_date = CURDATE LIMIT 0, 25

1630 – FUNCTION mytasks.COUNT does not exist. Check the ‘Function Name Parsing and Resolution’ section in the Reference Manual

Source: Stackoverflow

Leave a Reply

Your email address will not be published. Required fields are marked *