Mysql error
#1

Hello, i have been trying to import my .sql file into the database but it's showing me errors:

Here are the errors:

PHP код:
Static analysis:
4 errors were found during analysis.
1. Unrecognized data type. (near "USERNAME" at position 82)
2. A comma or a closing bracket was expected. (near "` varchar(24) NOT NULL, `" at position 90)
3. Unexpected beginning of statement. (near "11" at position 763)
4. Unrecognized statement type. (near "NOT NULL" at position 767
PHP код:
MySQL saidDocumentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USERNAME` varchar(24) NOT NULL,
  
`PASSWORDchar(65NOT NULL,
  `
SALTchar(11' at line 2 
And here is the code to my .sql file:

PHP код:
--
-- 
Table structure for table `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
  `
ID int(11) NOT NULL AUTO_INCREMENT,
  
`USERNAME` varchar(24) NOT NULL,
  
`PASSWORD` char(65) NOT NULL,
  
`SALT` char(11) NOT NULL,
  
`SCORE` mediumint(7),
  
`CASH` mediumint(7) NOT NULL DEFAULT '0',
  
`DEATHS` mediumint(7) NOT NULL DEFAULT '0',
  
`MODE` int(20) NOT NULL DEFAULT '0',
  
`IP` varchar(24) NOT NULL,
  
`ADMIN` int(11) NOT NULL,
  
`BAN` int(11) NOT NULL,
  
`WARNINGS` int(64) NOT NULL,
  
`VIP` int(11) NOT NULL,
  
`TOKENS` int(64) NOT NULL,
  
`KILLS` mediumint(7) NOT NULL DEFAULT '0',
  
`SKIN` mediumint(7) NOT NULL DEFAULT '0',
  
`NAMECHANGES` int(11) NOT NULL DEFAULT '0',
  
`CHAT` mediumint(7) NOT NULL DEFAULT '0',
  PRIMARY KEY (
`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 
Reply
#2

problem is here `ID int(11) NOT NULL AUTO_INCREMENT,

you have missing `

`ID` int(11) NOT NULL AUTO_INCREMENT,
Reply
#3

Quote:
Originally Posted by Mugala
Посмотреть сообщение
problem is here `ID int(11) NOT NULL AUTO_INCREMENT,

you have missing `

`ID` int(11) NOT NULL AUTO_INCREMENT,
Damn i didn't even notice that!
Fixed, thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)