I've been dealing with a bizarre and frustrating problem on my web server (it's a LAMP stack) where for some reason, every time you create a field of type TIMESTAMP (from the UI, from SQL code, or programmatically from PHP) it makes a unilateral decision that I absolutely need to add "ON UPDATE CURRENT_TIMESTAMP" to the syntax. This means that every time I update a record with a timestamp (even if I'm not changing it), that timestamp will automatically be forced to be = the current date/time. I Googled up a workaround...
ALTER TABLE table_name
column_name TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
..but I'm guessing there's some super-simple bit of SQL I can use in CREATE TABLE queries to prevent this wackadellic behavior altogether... or is there? Any of you ever fought with this one before? How did you get it to stop inserting "ON UPDATE CURRENT_TIMESTAMP" because it felt like it? Any clues as to the actual cause of this bug? Thanks in advance
Discuss other programming languages besides AutoHotkey
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests