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 PostOk, you probably need to take a deep breath and read up on MySQL, and possibly the phpMyAdmin application. I must be honest - I hate phpMyAdmin, so I use other GUIs. One you may find useful is SQLyog (Community Version), available from here:
All 10 Replies
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
diafol
Patiodude
0
Newbie Poster
diafol
Patiodude
0
Newbie Poster
Dani
4,084
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.