Hello. Why won't my Houses table create but my Users one do?
If I put my create Houses table in the "SendQuery" callback it creates, but if I put in under OnGameModeInit with the Users table it doesn't, weird. Does mysql_function_query only allow max per one table or something?:
pawn Код:
strcat(query, "CREATE TABLE IF NOT EXISTS `Users` (`ID` INT(5) NOT NULL AUTO_INCREMENT, `Username` VARCHAR(24) NOT NULL, `Password` VARCHAR(129) NOT NULL, `Salt` VARCHAR(30) NOT NULL, `Gender` INT(5) NOT NULL,");
strcat(query, "`Cash` INT(20) NOT NULL, `Bank` INT(20) NOT NULL, `BankReg` INT(10) NOT NULL, `Level` INT(10) NOT NULL, `Skin` INT(5) NOT NULL, `Admin` INT(5) NOT NULL, `AdminDuty` INT(5) NOT NULL,");
strcat(query, "`Owner` INT(5) NOT NULL, `Job` INT(5) NOT NULL, `Interior` INT(5) NOT NULL, `VirtualWorld` INT(5) NOT NULL, `NewbMute` INT(5) NOT NULL, `GetHouseID` INT(5) NOT NULL,");
strcat(query, "`PosX` float NOT NULL, `PosY` float NOT NULL, `PosZ` float NOT NULL, `PosA` float NOT NULL, PRIMARY KEY (`ID`))");
mysql_function_query(dbHandle, query, false, "SendQuery", "");
strcat(query, "CREATE TABLE IF NOT EXISTS `Houses` (`ID` INT(5) NOT NULL AUTO_INCREMENT, `Address` varchar(24) NOT NULL, `Owner` varchar(24) NOT NULL, `Price` int(10) NOT NULL, `Type` int(5) NOT NULL,");
strcat(query, "`VirtualWorld` int(5) NOT NULL, `Interior` int(5) NOT NULL, `PosX` float NOT NULL, `PosY` float NOT NULL, `PosZ` float NOT NULL, `EnterX` float NOT NULL, `EnterY` float NOT NULL,");
strcat(query, "`EnterZ` float NOT NULL, `EnterA` float NOT NULL, `ExitX` float NOT NULL, `ExitY` float NOT NULL, `ExitZ` float NOT NULL, `ExitA` float NOT NULL, PRIMARY KEY (`ID`))");
mysql_function_query(dbHandle, query, false, "SendQuery", "");
I don't wanna put it under SendQuery cause it doesn't seem like it is allowed there.
Have you checked to see how big query is? In this case it should be quite large, around 700 because you have 4 and 3 lines of strcat.
Yeah I set the query as 3000 just to check of it works and still doesn't.