I am using TIMESTAMP in MySQL which is being inseted with the NOW function().
The entries look correct: 20030426224931
When I use something like:
$newdate = date("m.d.y");
It comes out: 12.31.69
Any ideas?
hmm... current time should be more like: 1051418534
The thing is, TIMESTAMP is turning the current time in the form: YYYYMMDDHHMMSS
Is this because I am using NOW() to insert? Any idea why this is happening?
It is doing that because TIMESTAMP does not refer to PHP's implementation of a Unix timestamp, which is what you want for the date() function.
Since you plan to store that, use say, INT, not TIMESTAMP.
Actually, you might have to use UNIX_TIMESTAMP() instead of NOW()
Nowadays I tend to use PHP e.g. time() for that sort of thing, so I cant remember what is correct for a mysql database.
Sorry to keep bugging you! I am getting closer though... using INT (with no auto-increment) and the NOW() function gives me 2003... not: 1051418534
Thank you so much for your help, I really have tried hard to read the documentation before turning to the forums!!!
it worked, and i love you.