Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts

    Last update date in PHP for a mysql table ?

    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 ?

  • #2
    New Coder
    Join Date
    Jul 2008
    Posts
    86
    Thanks
    5
    Thanked 1 Time in 1 Post
    Check out the MySQL information_schema

    Code:
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •