How do you display last modified date

2004-06-10 Thread Daniel Venturini
Hello I am using PHP, mysql. How would I query mysql to display the last
time a table was last modified/changed/or updated. For example I have a user
that updates a stats page via the web, and I would like it to say (Current
up to The last date the stats table was modified). Thanks for your help,
I've been looking online as well but thought this may be quicker. Take care.
Thanks again.

Daniel


RE: How do you display last modified date

2004-06-10 Thread Dan V
I see the type timestamp. Should I leave value, attributes...blank. Do I
just query this field and format as need via DATE()?

Thanks for the heads up.
Take care.
-Original Message-
From: Paul McNeil [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 10, 2004 7:20 AM
To: MySQL General
Subject: Last Modified

If your table contains a timestamp field, it will update each time the row
is altered.  Otherwise I don't think it's possible.

You Wrote -
Hello I am using PHP, MySQL. How would I query MySQL to display the last
time a table was last modified/changed/or updated. For example I have a user
that updates a stats page via the web, and I would like it to say (Current
up to The last date the stats table was modified). Thanks for your help,
I've been looking online as well but thought this may be quicker. Take care.
Thanks again.

God Bless

Paul C. McNeil
Developer in Java, MS-SQL, MySQL, and web technologies.















GOD BLESS AMERICA!
To God Be The Glory!


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How do you display last modified date

2004-06-10 Thread Egor Egorov
Daniel Venturini [EMAIL PROTECTED] wrote:

 Hello I am using PHP, mysql. How would I query mysql to display the last
 time a table was last modified/changed/or updated. For example I have a user
 that updates a stats page via the web, and I would like it to say (Current
 up to The last date the stats table was modified). Thanks for your help,

Take a look at the TIMESTAMP column type. Add one to table and then you'l be 
able to use SELECT MAX(timestamp_column) on your table. 

See: http://dev.mysql.com/doc/mysql/en/DATETIME.html

 I've been looking online as well but thought this may be quicker. Take care.
 Thanks again.
 
 Daniel
 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How do you display last modified date

2004-06-10 Thread mysql1
On 10 Jun 2004 at 7:02, Daniel Venturini wrote:

 Hello I am using PHP, mysql. How would I query mysql to display the last
 time a table was last modified/changed/or updated. For example I have a user
 that updates a stats page via the web, and I would like it to say (Current
 up to The last date the stats table was modified). Thanks for your help,
 I've been looking online as well but thought this may be quicker. Take care.
 Thanks again.
 
 Daniel
 
USE database;
SHOW TABLE STATUS;

One of the fields returned is *Update_time*
Regards
Ian
--


-
Ian Gibbons  
Fish.Net Ltd Providing Internet Solutions   
http://www.fishnet.co.uk  e-mail [EMAIL PROTECTED]
Tel +44 (0)1457 819600 Fax +44 (0)1457 819602 
-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]