Hello. Need help with mysql strcat. -
I have problem with this line could some one teach me how to use strcat on big mysql lines...
pawn Код:
mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Admin`, `VIP`, `Money`, `PosX`, `PosY`, `PosZ`, `PosA`,);
format(query, sizeof(query),`Leader`, `Member`, `Rank`, `JobID`, `StreetRank`, `HouseID`, `BussinesID`, `CarID`, `CarID2`, `DrivingLicense`, `FlyingLicense`, `HeliLicense`,);
format(query, sizeof(query),`BoatLicense`, `ParasuteLicense`, `TPockets`, `TPocket2`, `JPocket`, `JPocket2`, `TV`, `Radio`, `Mp3Player`, `Computer`, `PhoneNumber`, `MaskID`,);
format(query, sizeof(query),`PhoneBook`, `FightingSyle`, `WalkingStyle`, `Strenght`, `Fat`, `SkinID`, `Health`, `Armor`, `Weapon`, `Ammo`, `Weapon1`, `Ammo1`, `Weapon2`, `Ammo2`, );
format(query, sizeof(query),`Weapon3`, `Ammo3`, `Weapon4`, `Ammo4`, `Weapon5`, `Ammo5`, `Weapon6`, `Ammo6`, `Weapon7`, `Ammo7`, `Weapon8`, `Ammo8`, `Weapon9`, `Ammo9`, `WeaponDealer`);
format(query, sizeof(query),VALUES ('%e', '%e', '%e', 0, 0, 0, %f, %f, %f, %f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, %f, %f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", playername, Player[playerid][Password], playerip, SPAWN_X, SPAWN_Y, SPAWN_Z, SPAWN_A);
Re: Hello. Need help with mysql strcat. -
I can only try and teach you how to normalize (see signature) so you don't have to write long lines to begin with. Besides that, there are only 7 actual variables to be inserted. Set default values on the columns.
Respuesta: Hello. Need help with mysql strcat. -
moreover, it is not necessary to add all this.. After all MySQL has the ability to set default values in the database, with an insert enough so that the values are restored to defaults and this will be added.
Re: Hello. Need help with mysql strcat. -
Okay thanks got it how to optimize basically half of the code is not used and unnecessary saved.