I have a query which I got help with last night but I am stuck on another bit.
The code I have is
SELECT a.name, COUNT(*) AS num FROM table2 b
INNER JOIN table1 a
ON b.status_id=a.id
GROUP BY status_id
What I would like to do now is only show results if they have been entered on today’s date? The date column is in table2. The format for the date column is date and time (eg 1341241153) but I only need to check if the date matches the current day. I hope that is clear.
Any help will be gratefully received!
EDIT: this is a MySQL database. I have tried all the solutions so far and nothings worked. Sorry for not being clearer!!
FINAL EDIT: The question was not clear enough so I posted again in order to get a quick response. The new question with complete solution can be seen here a link
if you
groupyou need ahavinginstead of awhere: