Pages 1
You must login or register to post a reply
Warning: count(): Parameter must be an array or an object that implements Countable in
/home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line
820
- Registered: 2007-01-08
- Posts: 256
Topic: problemos su TIMESTAMP
CREATE TABLE `agonija`.`polls` (
`id` INT UNSIGNED NOT NULL ,
`title` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`untill` TIMESTAMP NOT NULL ,
`on` ENUM( 'ON', 'OFF' ) NOT NULL DEFAULT 'ON',
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY ( `id` ) ,
INDEX ( `on` )
) ENGINE = MYISAM
MySQL atsakymas:
#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
Nesuprantu, kas čia blogai. Yra du TIMESTAMP, tačiau tik vienas su DEFAULT CURRENT_TIMESTAMP
- Registered: 2007-01-08
- Posts: 256
Re: problemos su TIMESTAMP
problema išpsrendžiau labai paprastai, tiesiog sukeičiau šuos du leukelius vietomis :D
CREATE TABLE `polls` (
`id` int(10) unsigned NOT NULL,
`title` varchar(128) character set utf8 NOT NULL,
`date` timestamp NOT NULL default CURRENT_TIMESTAMP,
`on` enum('ON','OFF') collate utf8_unicode_ci NOT NULL default 'OFF',
`until` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `on` (`on`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
Pages 1
You must login or register to post a reply