![]() |
Sergey Kornilov admin 1/27/2016 |
James, |
P
|
pmorenoc07 1/27/2016 |
I bought the Time Ago plugin from the market. I thought it would do what I wanted and it might. Just need to know how to set it up to do what I would like it to do. I made up my own topic here because there is no forum for it. Hope that is OK. What I would like to see if I can make it do is: When someone makes up a new record. I would like it to stay as how old that record is. So the plugin would keep adding time to it. Right now as it stands it keeps resetting to how long you viewed it. Least that is what it seems. If I stay on the page it grow in time. But if I refresh the page or come back to the page the Time Ago plugin starts over. I would like to make it stay on how old the record is from the beginning. Thanks for any help I could get on this. James Tandy
|
![]() |
Tandy author 1/29/2016 |
Hi, I did something like that using a PHP Time-ago function in this link http://www.phpdevtip...e-ago-function/
|
P
|
pmorenoc07 1/29/2016 |
Hi James $values['submit_time']= NOW();
Thank You that did help but I am still having problems. My Database field is called submit_time and I have that as datetime. I put as you wrote as well as tried to put the view as date and default as now(). I have also tried making the view as time and default is now(). The date somewhat works but the time is not going into the database. When I view the database record in phpMyAdmin the submit_date only shows date and does not put the the time in: 2016-01-26 00:00:00. What do I need to do to have the time added into the record? Thank you for your help.. James |
![]() |
Tandy author 1/29/2016 |
Hi James You need to change your database field submit_time to timestamp, Not Null and Default CURRENT_TIMESTAMP. Also you put in the Add page Before record added $values['submit_time']= NOW();
|