Ferindo Middleton Jr wrote:
Hank wrote:
Are the other fields in the update statement actually changing the
data? I don't know for sure, but if the data on disk is the same as
the update statement, mysql won't actually update the record, and
therefore might not update the last_updated field also.  Just a
thought.

Yes, I understand that one concept. I have seen it before.... If you do an update on a record but the actually values that you are passing in the statement are the exact values as were there before, no update to the timestamp field is made because none of the records values actually changed....

But no, that is not my situation. I've tested it.... and I am actually changing the values in the table (of course not specifying a new value for the TIMESTAMP field) but still the TIMESTAMP field doesn't auto-update.

What disturbes me is that it works fine in one particular table but all the others it works.

Ferindo

I'm running 5.0.19-nt. I haven't had a chance to test it but should it make any difference if I say:

    last_updated TIMESTAMP,

than if I say all this:

last_updated    TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,

I think this may be the difference in why some tables are auto incrementing and others aren't.

Ferindo

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

Reply via email to