28.01.2017, 20:53
Can someone give me a example of create table from gamemode, I want to test if the mysql connected and there is no good mysql wiki
new query[590];
format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `Tag` (`SQLIB` INTEGER PRIMARY KEY AUTO_INCREMENT, `ID` INT NOT NULL DEFAULT '0', `Owner` VARCHAR(25) NOT NULL DEFAULT '', `Text` VARCHAR(21) NOT NULL DEFAULT '', `x` FLOAT NOT NULL DEFAULT '0.0', `y` FLOAT NOT NULL DEFAULT '0.0', `z` FLOAT NOT NULL DEFAULT '0.0', `rX` FLOAT NOT NULL DEFAULT '0.0'");
strcat(query, ", `rY` FLOAT NOT NULL DEFAULT '0.0', `rZ` FLOAT NOT NULL DEFAULT '0.0', `Police` VARCHAR(31) NOT NULL DEFAULT '', `VirtualWorld` INT NOT NULL DEFAULT '0', `Interior` INT NOT NULL DEFAULT '0', `Exist` INT NOT NULL DEFAULT '0', `Color` INT NOT NULL DEFAULT '0')");
mysql_query(MySQL, query);
mysql_pquery(MySQL, "SELECT * FROM Tag", "OnTagLoading", "");