How can I add a message time on the message board to display the message time? complete code with comments & nbsp; thank you. can I add a message time field ?, My message board is also. add a message time field in the database table. you can directly insert the current time when you leave a message, and then display the message board's message time.
How to add and display the message time
Complete Code
With comments
Thank you.
------ Solution --------------------
Can I add a message time field?
------ Solution --------------------
My message board is also. add a message time field in the database table. when you leave a message, you can insert the current time directly. then, you can query it when it is displayed.
------ Solution --------------------
When adding a time field to the database, you should check which type is used. one is the timestamp, the field is set to int (10), and the other is datetime, if you set it to int, pay attention to the time zone... Let's take a look at the php manual and mysql manual.
------ Solution --------------------
In the database, it is best to add a time for adding a message to the table of messages. whenever a user adds a message, the database automatically adds the current time of the message to the table, you only need to query the displayed information. Haha ~
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.