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

  • Hall of Flame🔥

Topic-ul a fost șters deoarece nu ai respectat modelul de postare. Te rugăm sa revii cu alt topic in care să respecți modelul.

Topic șters!

ezgif-com-gif-maker-1-00000.png

Not So Zen SRL

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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