Uploading DB help
#1

Hello everybody, Now i face a problem while uploading my db files, and it is

Код:
SQL query:

-- --------------------------------------------------------
--
-- Table structure for table `pcp_news`
--
CREATE TABLE  `pcp_news` (

 `nw_id` INT( 11 ) NOT NULL ,
 `nw_title` VARCHAR( 24 ) NOT NULL ,
 `nw_body` LONGTEXT,
 `nw_sticked` TINYINT( 1 ) NOT NULL DEFAULT  '0',
 `nw_user` INT( 11 ) NOT NULL ,
 `nw_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = MYISAM DEFAULT CHARSET = latin1;

MySQL said: Documentation

#1067 - Invalid default value for 'nw_dateSQL query:

-- --------------------------------------------------------
--
-- Table structure for table `pcp_news`
--
CREATE TABLE  `pcp_news` (

 `nw_id` INT( 11 ) NOT NULL ,
 `nw_title` VARCHAR( 24 ) NOT NULL ,
 `nw_body` LONGTEXT,
 `nw_sticked` TINYINT( 1 ) NOT NULL DEFAULT  '0',
 `nw_user` INT( 11 ) NOT NULL ,
 `nw_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = MYISAM DEFAULT CHARSET = latin1;

MySQL said: Documentation

#1067 - Invalid default value for 'nw_date
Reply
#2

You can only have CURRENT_TIMESTAMP as default value of DATETIME in mysql 5.6.5+ so either update or remove the default value.
Reply
#3

Thanks, fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)