Why it's not working ?
#1

PHP Code:
string "CREATE TABLE IF NOT EXISTS masters (MASTER_ID int(11) NOT NULL AUTO_INCREMENT,\
    NAME varchar(24) NOT NULL,\
    IP varchar(24) NOT NULL,\
    PASSWORD char(65) NOT NULL,\
    SALT char(11) NOT NULL,\
    BAN tinyint(1) NOT NULL DEFAULT '0',\
    DATE int(11) NOT NULL DEFAULT '0',\
    EXPIRATION int(11) NOT NULL DEFAULT '0',\
    CHAR_ID[0] int(11) NOT NULL DEFAULT '0',\
    CHAR_ID[1] int(11) NOT NULL DEFAULT '0',\
    CHAR_ID[2] int(11) NOT NULL DEFAULT '0', PRIMARY KEY (ID), UNIQUE KEY NAME (NAME))"
;
    
mysql_tquery(Databasestring); 
I get this error
Code:
[18:42:21] [plugins/mysql] error #1064 while executing query "CREATE TABLE IF NOT EXISTS masters (ID int(11) NOT NULL AUTO_INCREMENT,NAME varchar(24) NOT NULL,IP varchar(24) NOT NULL,PASSWORD char(65) NOT NULL,SALT char(11) NOT NULL,BAN tinyint(1) NOT NULL DEFAULT '0',DATE int(11) NOT NULL DEFAULT '0',EXPIRATION int(11) NOT NULL DEFAULT '0',CHAR_ID[0] int(11) NOT NULL DEFAULT '0',CHAR_ID[1] int(11) NOT NULL DEFAULT '0',CHAR_ID[2] int(11) NOT NULL DEFAULT '0', PRIMARY KEY (ID), UNIQUE KEY NAME (NAME))": 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 '[0] int(11) NOT NULL DEFAULT '0',CHAR_ID[1] int(11) NOT NULL DEFAULT '0',' at line 1
Why is the [] are not working
Reply
#2

Any help ??
Reply
#3

Not 100% sure but I believe, MySQL Column names with brackets has different function so Its not gonna let you use them. You can use like, CHAR_ID_0, CHAR_ID_1 etc...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)