Forum Moderators: coopster
I'm rather new to mysql :->
I've built a table to show the latest news. It has the columns 'newsid','title','body' and 'dateline'. I have some troubles with this latter column because I don't know what value I've got to fill in there to show the date of the latest post. It has to show the date when the news has been published in the database.
Hope someone can help me.
Philip
If you are storing news articles I would imagine that you would want to use the DATETIME datatype. This will store the date values in MySQL in this format:
0000-00-00 00:00:00
YYYY-MM-DD
Then you can use the NOW() MySQL function to insert the current date/time to this field when each news record is added.
Hope this helps
MySQL Date and Time Functions [mysql.com]