unsider Posted April 6, 2008 Share Posted April 6, 2008 CREATE TABLE `gallery_images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(64) character SET utf8 NOT NULL, `ext` varchar( character SET utf8 NOT NULL, `image_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `data` longblob NOT NULL, PRIMARY KEY (`id`) ); I'm getting SQL error: #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 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `data` longbl Quote Link to comment Share on other sites More sharing options...
Barand Posted April 6, 2008 Share Posted April 6, 2008 As "DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" is the default behaviour you could try leaving it out. BTW (which MySQL version) Quote Link to comment Share on other sites More sharing options...
unsider Posted April 6, 2008 Author Share Posted April 6, 2008 I'll try that, and.. 4.0.23 Quote Link to comment Share on other sites More sharing options...
Barand Posted April 6, 2008 Share Posted April 6, 2008 CURRENT_TIMESTAMP doesn't get a mention in the "prior to 4.1" page of the manual on timestamp properties Quote Link to comment Share on other sites More sharing options...
unsider Posted April 6, 2008 Author Share Posted April 6, 2008 You're right, it doesn't. And you were right, error fixed. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.