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 Link to comment https://forums.phpfreaks.com/topic/99877-solved-query-error/ 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) Link to comment https://forums.phpfreaks.com/topic/99877-solved-query-error/#findComment-510821 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 Link to comment https://forums.phpfreaks.com/topic/99877-solved-query-error/#findComment-510823 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 Link to comment https://forums.phpfreaks.com/topic/99877-solved-query-error/#findComment-510825 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. Link to comment https://forums.phpfreaks.com/topic/99877-solved-query-error/#findComment-510827 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.