...

View Full Version : Last update date in PHP for a mysql table ?



jeddi
11-03-2009, 11:54 AM
Is there a PHP variable/constant connected to a mysql database table that states when the table was last updated ?

Or is this something that I will have to save myself when I update it ?

You see, I update the whole table in one go from a xml download every few days and I want to display how current the table is.

Obviously I don't need the date on every row of the table, I just need it once somewhere. If is automatically stored somewhere, maybe I can use it ?

Anyone know about this ?

the moose
11-03-2009, 12:32 PM
Check out the MySQL information_schema


SELECT UPDATE_TIME
FROM information_schema.tables
WHERE TABLE_SCHEME = 'dbname'
AND TABLE_NAME = 'tabname'

It does depend on the version of MySQL you are using.

Good luck!

Cheers

The Moose



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum