I'd like to add a timestamp to articles I upload to my website, which reads the time and date the article was uploaded. I've got a database, as well as a working connect.php. In this database, I've created a table with a "date" field (type: date). What can I do to get the timestamps working?
Patiodude 0 Newbie Poster
Recommended Answers
Jump to PostI'm confused by your question. The date column would be a column of your articles table, as would the message body column. For example, the following might be a structure of your articles table:
id | title | body | date ------------------------
Your php code would …
Jump to PostWHat do you mean by timestamp? Datetime, e.g. 2012-06-24 13:09:34 or UNIX timestamp, e.g. 1340566711 . If you're saving as 'date', you're only saving '2012-06-24'?
Jump to PostphpMyAdmin fields are the equivalent of table columns. So if you ARE using phpMyAdmin, you'd want to create one table with multiple fields ... title, body, and date.
All 10 Replies
Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member

diafol
Patiodude 0 Newbie Poster

diafol
Patiodude 0 Newbie Poster
Dani 4,675 The Queen of DaniWeb Administrator Featured Poster Premium Member
Patiodude 0 Newbie Poster

diafol
Patiodude 0 Newbie Poster

diafol
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.