Preserved Topic: display date of last mysql table addition (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: 290 km/h, fast lane, Autobahn, Germany |
posted 10-28-2002 22:11
i have a website based backed by an mysql database and I'd like it to display the "last updated" date on the main page. since the database is merely used for generating a list table it probably shouldn't be too hard. the database entries don't have dates. |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 10-28-2002 22:54 |
Paranoid (IV) Inmate From: Milwaukee |
posted 10-29-2002 00:58
Yep, just add a "datetime" field to the table, and whenever you do an INSERT or UPDATE query, use the SQL function NOW() to generate the date. Like, "INSERT INTO table (id, content, datetime) VALUES ($variable1, $variable2, NOW())" Edit: fixed syntax |
Bipolar (III) Inmate From: 290 km/h, fast lane, Autobahn, Germany |
posted 10-29-2002 15:33
thanx guys, |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-29-2002 19:48
Moving this to the server-side forum............ |