PHP + MySQL + Dates (and using them, not just storing)
Posted: Tue Jan 23, 2007 7:34 pm
I have (...well, I WILL have) a script that will log a value to a database and keep it there for 14 days.
After 14 days, it will retrieve the value again, update the database, and update the timestamp.
Can someone please guide me along this process? I mostly need help on the best way to achieve this. I am using "MEDIUMINT" for the column, but that can be changed.
How should I store the timestamp (format?) and which function? I was just reading something about using datetime instead of timestamp or something... is one way better than the other? I don't need it to store the TIME, only the DAY (it will refresh every 14 days)
Any help will be appreciated.
After 14 days, it will retrieve the value again, update the database, and update the timestamp.
Can someone please guide me along this process? I mostly need help on the best way to achieve this. I am using "MEDIUMINT" for the column, but that can be changed.
How should I store the timestamp (format?) and which function? I was just reading something about using datetime instead of timestamp or something... is one way better than the other? I don't need it to store the TIME, only the DAY (it will refresh every 14 days)
Any help will be appreciated.