Jump to content

[DELETED]Problema SQL


SQRIN
 Share

Recommended Posts

Comanda SQL:

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

`ID` INT( 11 ) NOT NULL ,
`comment_type` INT( 11 ) NOT NULL ,
`comment_topic` INT( 11 ) NOT NULL ,
`comment_UserID` INT( 11 ) NOT NULL ,
`comment_text` TEXT NOT NULL ,
`comment_hide` INT( 11 ) NOT NULL ,
`comment_extra` TEXT NOT NULL ,
`created_at` TIMESTAMP NOT NULL DEFAULTCURRENT_TIMESTAMP( ) ,
`updated_at` TIMESTAMP NOT NULL DEFAULTCURRENT_TIMESTAMP( )

) ENGINE = INNODB DEFAULT CHARSET = latin1;
 

 

MySQL zice: Documentație

#1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Link to comment
Share on other sites

Incearca acum:

CREATE TABLE `inf_comments` (

`ID` INT( 11 ) NOT NULL ,
`comment_type` INT( 11 ) NOT NULL ,
`comment_topic` INT( 11 ) NOT NULL ,
`comment_UserID` INT( 11 ) NOT NULL ,
`comment_text` TEXT NOT NULL ,
`comment_hide` INT( 11 ) NOT NULL ,
`comment_extra` TEXT NOT NULL ,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP( ) ,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP( )
) ENGINE = INNODB DEFAULT CHARSET = latin1;

 

Link to comment
Share on other sites

Acum 12 ore, DiBlaine a spus:

Incearca acum:

CREATE TABLE `inf_comments` ( `ID` INT( 11 ) NOT NULL , `comment_type` INT( 11 ) NOT NULL , `comment_topic` INT( 11 ) NOT NULL , `comment_UserID` INT( 11 ) NOT NULL , `comment_text` TEXT NOT NULL , `comment_hide` INT( 11 ) NOT NULL , `comment_extra` TEXT NOT NULL , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP( ) , `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP( ) ) ENGINE = INNODB DEFAULT CHARSET = latin1;


CREATE TABLE `inf_comments` (

`ID` INT( 11 ) NOT NULL ,
`comment_type` INT( 11 ) NOT NULL ,
`comment_topic` INT( 11 ) NOT NULL ,
`comment_UserID` INT( 11 ) NOT NULL ,
`comment_text` TEXT NOT NULL ,
`comment_hide` INT( 11 ) NOT NULL ,
`comment_extra` TEXT NOT NULL ,
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP( ) ,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP( )
) ENGINE = INNODB DEFAULT CHARSET = latin1;

 

tot nu mere

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...