Menu

#2382 (ok 2.11) Update timestamp

2.10.0.2
fixed
1
2013-06-11
2007-03-06
Thog
No

CREATE TABLE `z_2007_01_15_data` (
`user_id` int(10) unsigned NOT NULL,
`one` float unsigned NOT NULL,
`two` float unsigned NOT NULL,
`three` float unsigned NOT NULL,
`total` float unsigned NOT NULL,
`posted_on` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`pay` int(10) unsigned NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Then

1) Click on Structure
2) Modify posted_on field
3) Change "Atributes" to '';
Uncheck "Current Timestamp"
Default to "0000-00-00 00:00:00"
4) Save

SQL query:

ALTER TABLE `z_2007_01_15_data` CHANGE `posted_on` `posted_on` TIMESTAMP NOT NULL DEFAULT 0000 -00 -0000 :00 :00

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-00-00 00:00:00' at line 1

Discussion

  • Marc Delisle

    Marc Delisle - 2007-03-08
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-03-08
    • priority: 5 --> 1
    • summary: Update timestamp --> (ok 2.11) Update timestamp
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-08-21
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed