Hi,
I need to select today's and yesterday's entries separately from date column. Date is in this format: 2006-07-28 10:10:26. I have done it once before but now I forgot. The thing is I want one page to display all todays entries and another page to display yesterdays.
I've tried like this:
for today:
SELECT * FROM table WHERE addeddatetime = CURDATE()
for yesterday:
SELECT * FROM table WHERE addeddatetime = (CURDATE() + INTERVAL -1 DAY)
But these doesn't work. I'd really appreciate it if anyone can help me with is.
BTW, I'm using: MySQL 5.1 and PHP 5.1