How can I update status at regular intervals? For example when user wrote a comment, time show below comment like;
Some comment
1 minute ago
After 1 hour I want to it like;
Some comment
1 hour ago
Can I do this with PHP & MySQL?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you’re after is called ‘humanizing’ the time difference
If you want to do this with javascript so you don’t need to do ajax to reload the value over and over check out:
http://momentjs.com/docs/
If you want to do this with PHP, check out the following snippet:
https://gist.github.com/1053741