|
Posted by J.O. Aho on 12/13/06 11:37
ulyx wrote:
> and i get each time #1064 error.
First of all, please include the whole error message, it's a lot easier to see
what may be wrong than just a number.
example:
ERROR 1064 (42000): 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` mediumblob NOT NULL,' at line 5
> CREATE TABLE `ae_gallery` (
> `id` int(11) NOT NULL auto_increment,
> `title` varchar(64) character set utf8 NOT NULL,
> `ext` varchar(8) character set utf8 NOT NULL,
> `image_time` timestamp NOT NULL default,
> CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
> `data` mediumblob NOT NULL,
> PRIMARY KEY (`id`)
> );
>
> and i get each time #1064 error.
> I know that this is becuse version mismatch but how can i avoid this.Which
> variables are changed and which not, from last versions ?
You are trying to create a column whit a reserved word, see the following page
on the online manual
http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
See also http://dev.mysql.com/doc/refman/5.0/en/timestamp-4-1.html
CREATE TABLE `ae_gallery` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(64) character set utf8 NOT NULL,
`ext` varchar(8) character set utf8 NOT NULL,
`image_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
`data` mediumblob NOT NULL,
PRIMARY KEY (`id`)
);
--
//Aho
Navigation:
[Reply to this message]
|