I would like to retrive a TODAY'S data from the database, but I don't know how to do it. I would actually want to get the data from NOT the past 24 hours, I just want today's data (so based on the actual server time).

I would also like to get data which was yesterday. Can anyone help me how to do it?

note that string concatenation is frowned upon in SQL queries; yes, I know this is only an example
–
tucuxiSep 23 '12 at 11:40

"SELECT id FROM folk WHERE time >= ".mktime(0, 0, 0) Its actually not working. It gives me all the data, not just that day :/
–
user1406071Sep 23 '12 at 11:41

Hmm, it should be working? I've tested the timestamps and they are accurate, so I can only assume that the comparison is failing or it isn't able to match the two against each other. @tucuxi I know, but trying to keep it short and sweet ;-)
–
DavidSep 23 '12 at 11:47