Hi, I was wondering how I can get the 14 digit timestamp from PHP3? I tried to insert a row in phpMyAdmin with no luck. My guess is that I have to get this value in PHP3 program?
If you want to insert the current time into a TIMESTAMP-type column in MySQL, all you have to do is insert NULL. MySQL will calculate the timestamp itself. Changing the values of any of the other columns in the row will also automatically update the first TIMESTAMP column in the row.
If this doesn't answer your question, let me know and I'll try to help further.
Hi, it doesn't work. Our server does not insert a timestamp for me. I have to do it the old-fashion way using a time() thing and change it a 14-digit timestamp.
I have timestamp ready; can you tell me how to display last month's news?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote/font><HR>Hi, it doesn't work. Our server does not insert a timestamp for me. I have to do it the old-fashion way using a time() thing and change it a 14-digit timestamp.<HR></BLOCKQUOTE>
Here's how to generate the 14-digit timestamp you need in PHP:
$timestamp = date("YmdHis");
I stress again, however, that you should NOT have to do this. If MySQL isn't inserting the timestamp for you, this may be a symptom of a bigger problem!
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote/font><HR>I have timestamp ready; can you tell me how to display last month's news?<HR></BLOCKQUOTE>
Bookmarks