Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MySQL Records

Options
  • 07-03-2006 4:27pm
    #1
    Registered Users Posts: 180 ✭✭


    Hey there,

    Hopefully someone may be able to help me.

    I was just wondering if mysql recorded a datestamp when a new record is created in a database?

    If it did, how would I go about checking this?

    thanks


Comments

  • Registered Users Posts: 1,193 ✭✭✭liamo


    If there's a datetime field in the table and it was populated at the time of insert then the answer to your first question is "Yes".

    As to your second question; it's a little vague but I think you're asking how you would check the value of the datetime field for a specific record. If you are, the answer is : you need to issue a select statement which will return a recordset. How you modify your select statement to return just the record you want is beyond the scope of this answer based on your question.


  • Registered Users Posts: 180 ✭✭marcphisto


    Hi liamo,

    thanks for that but my problem is that none of the records are timestamped by the program that uploaded them, so there is nothing in the database for me to check.

    I was just wondering if mysql automatically kept a log of record updates somewhere that I could be able to look at and maybe decipher things from there.

    I didn't write it and am now left dealing with the mess to clean up!


  • Closed Accounts Posts: 756 ✭✭✭Zaph0d


    Yes it does. All statements that change data (INSERTs, UPDATEs and DELETEs) are recorded in the binary log along with the timestamp. You can examine the binary log using mysqlbinlog utility which you should Google.


Advertisement