new query[680];
mysql_format(mysql, query, sizeof(query), "CREATE TABLE IF NOT EXISTS `Users` ( "\
"`UserID` int(10) NOT NULL AUTO_INCREMENT," \
"`Username` varchar(24) NOT NULL," \
"`AdminLevel` int(1) NOT NULL DEFAULT '0'," \
"`IP` varchar(16) NOT NULL," \
"`Registration` varchar(10) NOT NULL," \
"`Password` varchar(256) NOT NULL," \
"`Score` int(10) NOT NULL DEFAULT '0'," \
"`Kills` int(10) NOT NULL DEFAULT '0'," \
"`Deaths` int(10) NOT NULL DEFAULT '0', " \
"`Assists` int(10) NOT NULL DEFAULT '0', ");
strcat(query, "`VIP` int(1) NOT NULL DEFAULT '0', " \
"`VIPExpire` varchar(10), " \
"`AutoLogin` int(1) NOT NULL DEFAULT '0', " \
" PRIMARY KEY (`UserID`)" \
" ENGINE = InnoDB DEFAULT CHARSET = latin1)", sizeof(query));
mysql_tquery(mysql, query);
[06:37:56] [ERROR] CMySQLQuery::Execute[] - (error #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 'ENGINE = InnoDB DEFAULT CHARSET = latin1' at line 1
" )ENGINE = InnoDB DEFAULT CHARSET = latin1", sizeof(query));
CREATE TABLE IF NOT EXISTS `Users` (
`UserID` int(10) NOT NULL ,
`Username` varchar(24) NOT NULL,
`AdminLevel` int(1) NOT NULL DEFAULT 0,
`IP` varchar(16) NOT NULL,
`Registration` varchar(10) NOT NULL,
`Password` varchar(256) NOT NULL,
`Score` int(10) NOT NULL DEFAULT 0,
`Kills` int(10) NOT NULL DEFAULT 0,
`Deaths` int(10) NOT NULL DEFAULT 0,
`Assists` int(10) NOT NULL DEFAULT 0,
`VIP` int(1) NOT NULL DEFAULT 0,
`VIPExpire` varchar(10),
`AutoLogin` int(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
closing parentheses should be before ENGINE dont include it in those
PHP код:
PHP код:
|