Hello everybody.
There is a row in my db table I have set it's type as "TIMESTAMP". How should I fill in?
Should get the current timestamp in php and send it to that row, correct?
So how can I do that?
Niloofar24 15 Posting Whiz
Recommended Answers
Jump to PostWhy you need to get the timestamp from php and update timestamp field in table? We can always use the
CURRENT_TIMESTAMP()
directly from mysql. Refer https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html for more options.
Jump to Post
UPDATE mytable SET timestamp_field = CURRENT_TIMESTAMP()
All 5 Replies
lps 71 Posting Pro in Training
Niloofar24 15 Posting Whiz
edbr 22 Junior Poster
lps 71 Posting Pro in Training
Niloofar24 15 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.