Jump to content

adding time to post


Jaynesh

Recommended Posts

 

You need to store somewhere the time this was created:

Make a new field in your table eg: postTime and input into it either a unix timestamp or a mysql date/time when creating the post entry.

 

Then when pulling the post from the table, get the time with it and process accordingly 

Link to comment
https://forums.phpfreaks.com/topic/241735-adding-time-to-post/#findComment-1241540
Share on other sites

 

You need to store somewhere the time this was created:

Make a new field in your table eg: postTime and input into it either a unix timestamp or a mysql date/time when creating the post entry.

 

Then when pulling the post from the table, get the time with it and process accordingly 

 

With mysql the easiest way is to use a timestamp column.  It has the advantage of space savings as well (4 bytes vs. 8 bytes for a date/time) as well as automation functionality.  http://www.gizmola.com/blog/archives/93-Too-much-information-about-the-MySQL-TIMESTAMP.html

Link to comment
https://forums.phpfreaks.com/topic/241735-adding-time-to-post/#findComment-1241541
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.