I have this query:
select count(id) AS num,date_id from table
where FROM_UNIXTIME(date_id,'%d-%m-%Y')='17-08-2009' order by date_id DESC;
This should result in all the id's posted on today's date, but it is giving only one id (the highest one). When I remove count(id)
from this query, it runs fine.
Why doesn't this count work with this query?