db_free_result( db_query( Database, "CREATE TABLE IF NOT EXISTS `Users` \
( `Nume` TEXT,\
`IP` NUMERIC,\
`Password` TEXT,\
`Score` NUMERIC,\
`Money` NUMERIC,\
`VIPlevel` NUMERIC,\
`AdminLevel` NUMERIC,\
`JoinedOn` NUMERIC,\
`Muted` NUMERIC,\
`Frozen` NUMERIC,\
`Warnings` NUMERIC,\
`NameColor` CHARACTER,\
`Kills` NUMERIC,\
`Deaths` NUMERIC,\
`Weapon1` NUMERIC,\
`Weapon2` NUMERIC,\
`Weapon3` NUMERIC,\
`Weapon4` NUMERIC,\
`Weapon5` NUMERIC,\
`Weapon1Ammo` NUMERIC,\
`Weapon2Ammo` NUMERIC,\
`Weapon3Ammo` NUMERIC,\
`Weapon4Ammo` NUMERIC,\
`Weapon5Ammo` NUMERIC,\
`Coins` NUMERIC )" ) );
new string[256];
format(string,256,"CREATE TABLE IF NOT EXISTS `Users` \
( `Nume` TEXT,\
`IP` NUMERIC,\
`Password` TEXT,\
`Score` NUMERIC,\
`Money` NUMERIC,\
`VIPlevel` NUMERIC,\
`AdminLevel` NUMERIC,\
`JoinedOn` NUMERIC,\
`Muted` NUMERIC,\
`Frozen` NUMERIC,\
`Warnings` NUMERIC,\
`NameColor` CHARACTER,\
`Kills` NUMERIC,\
`Deaths` NUMERIC,\
`Weapon1` NUMERIC,\
`Weapon2` NUMERIC,\
`Weapon3` NUMERIC,\
`Weapon4` NUMERIC,\
`Weapon5` NUMERIC,\
`Weapon1Ammo` NUMERIC,\
`Weapon2Ammo` NUMERIC,\
`Weapon3Ammo` NUMERIC,\
`Weapon4Ammo` NUMERIC,\
`Weapon5Ammo` NUMERIC,\
`Coins` NUMERIC )";
db_free_result( db_query( Database,string));
format(string, sizeof(string), "bla bla bla", var, var, var);
format(string, sizeof(string), "%s bla bla bla", string, var, var);
new stringsql[256]; format(stringsql, 256 ,"CREATE TABLE IF NOT EXISTS `users` ( \ `id` int(30) NOT NULL AUTO_INCREMENT, \ `name` varchar(24) NOT NULL, \ `Key` varchar(129) NOT NULL, \ `Level` int(12) NOT NULL, \ `AdminLevel` int(12) NOT NULL, \ `DonateRank` int(12) NOT NULL, \ `UpgradePoints` int(12) NOT NULL, \ `ConnectedTime` int(12) NOT NULL, \ `Registered` int(12) NOT NULL, \ `Sex` int(12) NOT NULL, \ `Age` int(12) NOT NULL, \ `Origin` int(12) NOT NULL, \ `CK` int(12) NOT NULL, \ `Muted` int(12) NOT NULL, \ `Respect` int(12) NOT NULL, \ `Money` int(12) NOT NULL, \ `Bank` int(12) NOT NULL, \ `Crimes` int(12) NOT NULL, \ `Kills` int(12) NOT NULL, \ `Deaths` int(12) NOT NULL, \ `Arrested` int(12) NOT NULL, \ `WantedDeaths` int(12) NOT NULL, \ `PhoneBook` int(12) NOT NULL, \ `LottoNr` int(12) NOT NULL, \ `Fishes` int(12) NOT NULL, \ `BiggestFish` int(12) NOT NULL, \ `Job` int(12) NOT NULL, \ `Paycheck` int(12) NOT NULL, \ `HeadValue` int(12) NOT NULL, \ `Jailed` int(12) NOT NULL, \ `Materials` int(12) NOT NULL, \ `Drugs` int(12) NOT NULL, \ `Leader` int(12) NOT NULL, \ `Member` int(12) NOT NULL, \ `FMember` int(12) NOT NULL, \ `Rank` int(12) NOT NULL, \ `Char` int(12) NOT NULL, \ `ContractTime` int(12) NOT NULL, \ `DetSkill` int(12) NOT NULL, \ `SexSkill` int(12) NOT NULL, \ `BoxSkill` int(12) NOT NULL, \ `LawSkill` int(12) NOT NULL, \ `MechSkill` int(12) NOT NULL, \ `JackSkill` int(12) NOT NULL, \ `CarSkill` int(12) NOT NULL, \ `NewsSkill` int(12) NOT NULL, \ `DrugsSkill` int(12) NOT NULL, \ `CookSkill` int(12) NOT NULL, \ `FishSkill` int(12) NOT NULL, \ `pSHealth` float NOT NULL, \ `pHealth` float NOT NULL, \ `Int` int(12) NOT NULL, \ `Local` int(12) NOT NULL, \ `Team` int(12) NOT NULL, \ `Model` int(12) NOT NULL, \ `PhoneNr` int(12) NOT NULL, \ `House` int(12) NOT NULL, \ `Bizz` int(12) NOT NULL, \ `Pos_x` float NOT NULL, \ `Pos_y` float NOT NULL, \ `Pos_z` float NOT NULL, \ `CarLic` int(12) NOT NULL, \ `FlyLic` int(12) NOT NULL, \ `BoatLic` int(12) NOT NULL, \ `FishLic` int(12) NOT NULL, \ `GunLic` int(12) NOT NULL, \ `Gun1` int(12) NOT NULL, \ `Gun2` int(12) NOT NULL, \ `Gun3` int(12) NOT NULL, \ `Gun4` int(12) NOT NULL, \ `Ammo1` int(12) NOT NULL, \ `Ammo2` int(12) NOT NULL, \ `Ammo3` int(12) NOT NULL, \ `Ammo4` int(12) NOT NULL, \ `CarTime` int(12) NOT NULL, \ `PayDay` int(12) NOT NULL, \ `PayDayHad` int(12) NOT NULL, \ `CDPlayer` int(12) NOT NULL, \ `Wins` int(12) NOT NULL, \ `Loses` int(12) NOT NULL, \ `AlcoholPerk` int(12) NOT NULL, \ `DrugPerk` int(12) NOT NULL, \ `MiserPerk` int(12) NOT NULL, \ `PainPerk` int(12) NOT NULL, \ `TraderPerk` int(12) NOT NULL, \ `Tutorial` int(12) NOT NULL, \ `Mission` int(12) NOT NULL, \ `Warnings` int(12) NOT NULL, \ `Adjustable` int(12) NOT NULL, \ `Fuel` int(12) NOT NULL, \ `Married` int(12) NOT NULL, \ `MarriedTo` varchar(24) NOT NULL, \ PRIMARY KEY (`id`) \ )", false, "SendQuery", ""); mysql_function_query(mysqlh, stringsql)
Why are you creating tables with the script?, specialy tables which are sized like this, why don't just make a folder somewere in your server map or on your pc with .sql files, and when you have to create them you import them from those files, because you only have to do this once in a long time normaly, so I don't get the point of making a script for it.
|
Why are you creating tables with the script?, specialy tables which are sized like this, why don't just make a folder somewere in your server map or on your pc with .sql files, and when you have to create them you import them from those files, because you only have to do this once in a long time normaly, so I don't get the point of making a script for it.
|
I think the opposite, if the table creation is in the script its easy to modify the database on the go. Whereas if your just copying files the table structure is static. Unless you add/alter columns with a script which beats the point of not creating the db via script in the first place.
Not to mention if you update the table structure then copy it to your server, you loose all the records currently in the db, unless you do a huge query. That's just me tho. |
I totally agree, why would someone want to create a table from pawno script, while it can also be done in the phpmyadmin in 1 second without any issues, and it would be abit smarter aswell, especially if you met such issue.
|