2

I have stored php time() in to database table with field created. That time stored in my database successfully.

Now I am willing to write a query which gets only today record from that table.

I have done something like this but not workin strtotime("2012-12-12");

For eg: I have stored this time in table 1355209509. So I want to retrieve all records of this date from mysql.

2

1 Answer 1

5

You can use this query -

SELECT * FROM <table> WHERE DATE(FROM_UNIXTIME(<unix_time_column>)) = CURDATE()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.