18.07.2013, 10:09
How would I merge querys so it saves and doesn't just skip it as I have gone over the 3500 limit.
Why would you actually need a 3500 character query? You could increase the cell size and produce a larger query, although I wouldn't see the need to be using 3500 characters in a single query. Could you please post this query?
|
new Float:x, Float:y, Float:z, Float:pArmour, Float:pHealth, query[3500],query2[3500];
GetPlayerPos(playerid, x, y, z);
Player[playerid][LastPos][0] = x;
Player[playerid][LastPos][1] = y;
Player[playerid][LastPos][2] = z;
GetPlayerHealth(playerid, pHealth);
Player[playerid][Health] = pHealth;
GetPlayerArmour(playerid, pArmour);
Player[playerid][Armour] = pArmour;
Player[playerid][InteriorID] = GetPlayerInterior(playerid);
Player[playerid][VirtualWorld] = GetPlayerVirtualWorld(playerid);
format(query, sizeof(query), "UPDATE players SET Health='%f',Armour='%f',LastX='%f',LastY='%f',LastZ='%f',InteriorID=%d,VirtualWorld=%d,Skin=%d,Gender=%d,Age=%d,Faction=%d,Money=%d,BankMoney=%d,PlayingHours=%d,Paycheck=%d,AdminRank=%d",
Player[playerid][Health],Player[playerid][Armour],Player[playerid][LastPos][0],Player[playerid][LastPos][1],Player[playerid][LastPos][2],Player[playerid][InteriorID],Player[playerid][VirtualWorld],
Player[playerid][Skin],Player[playerid][Gender],Player[playerid][Age],Player[playerid][Faction],Player[playerid][Money],Player[playerid][BankMoney],Player[playerid][PlayingHours],Player[playerid][Paycheck],Player[playerid][AdminRank]);
format(query, sizeof(query), "%s,WeaponSlot1=%d,WeaponSlot2=%d,WeaponSlot3=%d,WeaponSlot4=%d,WeaponSlot5=%d,WeaponSlot6=%d,WeaponSlot7=%d,WeaponSlot8=%d,WeaponSlot9=%d,WeaponSlot10=%d,WeaponSlot11=%d,WeaponSlot12=%d,WeaponSlot13=%d",query,
Player[playerid][WeaponSlot][0],Player[playerid][WeaponSlot][1],Player[playerid][WeaponSlot][2],Player[playerid][WeaponSlot][3],Player[playerid][WeaponSlot][4],Player[playerid][WeaponSlot][5],Player[playerid][WeaponSlot][6],
Player[playerid][WeaponSlot][7],Player[playerid][WeaponSlot][8],Player[playerid][WeaponSlot][9],Player[playerid][WeaponSlot][10],Player[playerid][WeaponSlot][11],Player[playerid][WeaponSlot][12]);
format(query, sizeof(query), "%s,WeaponSlotAmmo1=%d,WeaponSlotAmmo2=%d,WeaponSlotAmmo3=%d,WeaponSlotAmmo4=%d,WeaponSlotAmmo5=%d,WeaponSlotAmmo6=%d,WeaponSlotAmmo7=%d,WeaponSlotAmmo8=%d,WeaponSlotAmmo9=%d,WeaponSlotAmmo10=%d",query,
Player[playerid][WeaponSlotAmmo][0],Player[playerid][WeaponSlotAmmo][1],Player[playerid][WeaponSlotAmmo][2],Player[playerid][WeaponSlotAmmo][3],Player[playerid][WeaponSlotAmmo][4],Player[playerid][WeaponSlotAmmo][5],
Player[playerid][WeaponSlotAmmo][6],Player[playerid][WeaponSlotAmmo][7],Player[playerid][WeaponSlotAmmo][8],Player[playerid][WeaponSlotAmmo][9]);
format(query, sizeof(query), "%s,WeaponSlotAmmo11=%d,WeaponSlotAmmo12=%d,WeaponSlotAmmo13=%d,FactionRank=%d,WalkieTalkie=%d,NMute=%d,IsPrisoned=%d,IsDead=%d,SecondsOn=%d,Rope=%d,Rags=%d,CellPhone=%d,PhoneBook=%d",query,
Player[playerid][WeaponSlotAmmo][10],Player[playerid][WeaponSlotAmmo][11],Player[playerid][WeaponSlotAmmo][12],Player[playerid][FactionRank],Player[playerid][WalkieTalkie],Player[playerid][NMute],Player[playerid][IsPrisoned],
Player[playerid][IsDead],Player[playerid][SecondsOn],Player[playerid][Rope],Player[playerid][Rags],Player[playerid][CellPhone],Player[playerid][PhoneBook]);
format(query, sizeof(query), "%s,v1ID=%d,v2ID=%d,v3ID=%d,v4ID=%d,v5ID=%d,v1Fuel=%d,v2Fuel=%d,v3Fuel=%d,v4Fuel=%d,v5Fuel=%d,v1Model=%d,v2Model=%d,v3Model=%d,v4Model=%d,v5Model=%d,v1LockStatus=%d,v2LockStatus=%d,v3LockStatus=%d,v4LockStatus=%d",query,
Player[playerid][vID][0],Player[playerid][vID][1],Player[playerid][vID][2],Player[playerid][vID][3],Player[playerid][vID][4],Player[playerid][vFuel][0],Player[playerid][vFuel][1],Player[playerid][vFuel][2],Player[playerid][vFuel][3],Player[playerid][vFuel][4],
Player[playerid][vModel][0],Player[playerid][vModel][1],Player[playerid][vModel][2],Player[playerid][vModel][3],Player[playerid][vModel][4],Player[playerid][vLockStatus][0],Player[playerid][vLockStatus][1],Player[playerid][vLockStatus][2],
Player[playerid][vLockStatus][3],Player[playerid][vLockStatus][4]);
format(query, sizeof(query), "%s,v1Mod1=%d,v1Mod2=%d,v1Mod3=%d,v1Mod4=%d,v1Mod5=%d,v1Mod6=%d,v1Mod7=%d,v1Mod8=%d,v1Mod9=%d,v1Mod10=%d,v1Mod11=%d,v1Mod12=%d,v1Mod13=%d,v2Mod1=%d,v2Mod2=%d,v2Mod3=%d,v2Mod4=%d,v2Mod5=%d,v2Mod6=%d,v2Mod7=%d",query,
Player[playerid][vMods][0],Player[playerid][vMods][1],Player[playerid][vMods][2],Player[playerid][vMods][3],Player[playerid][vMods][4],Player[playerid][vMods][5],Player[playerid][vMods][6],Player[playerid][vMods][7],Player[playerid][vMods][8],
Player[playerid][vMods][9],Player[playerid][vMods][10],Player[playerid][vMods][11],Player[playerid][vMods][12],Player[playerid][vMods][13],Player[playerid][vMods][14],Player[playerid][vMods][15],Player[playerid][vMods][16],Player[playerid][vMods][17],
Player[playerid][vMods][18],Player[playerid][vMods][19]);
format(query, sizeof(query), "%s,v2Mod8=%d,v2Mod9=%d,v2Mod10=%d,v2Mod11=%d,v2Mod12=%d,v2Mod13=%d,v3Mod1=%d,v3Mod2=%d,v3Mod3=%d,v3Mod4=%d,v3Mod5=%d,v3Mod6=%d,v3Mod7=%d,v3Mod8=%d,v3Mod9=%d,v3Mod10=%d,v3Mod11=%d,v3Mod12=%d,v3Mod13=%d",query,
Player[playerid][vMods][20],Player[playerid][vMods][21],Player[playerid][vMods][22],Player[playerid][vMods][23],Player[playerid][vMods][24],Player[playerid][vMods][25],Player[playerid][vMods][26],Player[playerid][vMods][27],Player[playerid][vMods][28],
Player[playerid][vMods][29],Player[playerid][vMods][30],Player[playerid][vMods][31],Player[playerid][vMods][32],Player[playerid][vMods][33],Player[playerid][vMods][34],Player[playerid][vMods][35],Player[playerid][vMods][36],Player[playerid][vMods][37],
Player[playerid][vMods][38]);
format(query, sizeof(query), "%s,v4Mod1=%d,v4Mod2=%d,v4Mod3=%d,v4Mod4=%d,v4Mod5=%d,v4Mod6=%d,v4Mod7=%d,v4Mod8=%d,v4Mod9=%d,v4Mod10=%d,v4Mod11=%d,v4Mod12=%d,v4Mod13=%d,v5Mod1=%d,v5Mod2=%d,v5Mod3=%d,v5Mod4=%d,v5Mod5=%d,v5Mod6=%d",query,
Player[playerid][vMods][39],Player[playerid][vMods][40],Player[playerid][vMods][41],Player[playerid][vMods][42],Player[playerid][vMods][43],Player[playerid][vMods][44],Player[playerid][vMods][45],Player[playerid][vMods][46],Player[playerid][vMods][47],
Player[playerid][vMods][48],Player[playerid][vMods][49],Player[playerid][vMods][50],Player[playerid][vMods][51],Player[playerid][vMods][52],Player[playerid][vMods][53],Player[playerid][vMods][54],Player[playerid][vMods][55],Player[playerid][vMods][56],
Player[playerid][vMods][57]);
format(query, sizeof(query), "%s,v5Mod7=%d,v5Mod8=%d,v5Mod9=%d,v5Mod10=%d,v5Mod11=%d,v5Mod12=%d,v5Mod13=%d,v1Colour1=%d,v1Colour2=%d,v2Colour1=%d,v2Colour2=%d,v3Colour1=%d,v3Colour2=%d,v4Colour1=%d,v4Colour2=%d,v5Colour1=%d,v5Colour2=%d",query,
Player[playerid][vMods][58],Player[playerid][vMods][59],Player[playerid][vMods][60],Player[playerid][vMods][61],Player[playerid][vMods][62],Player[playerid][vMods][63],Player[playerid][vMods][64],Player[playerid][vColour][0],Player[playerid][vColour][1],
Player[playerid][vColour][2],Player[playerid][vColour][3],Player[playerid][vColour][4],Player[playerid][vColour][5],Player[playerid][vColour][6],Player[playerid][vColour][7],Player[playerid][vColour][8],Player[playerid][vColour][9]);
format(query, sizeof(query), "%s,v1PosX=%f,v1PosY=%f,v1PosZ=%f,v2PosX=%f,v2PosY=%f,v2PosZ=%f,v3PosX=%f,v3PosY=%f,v3PosZ=%f,v4PosX=%f,v4PosY=%f,v4PosZ=%f,v5PosX=%f,v5PosY=%f,v5PosZ=%f,ToolKit=%d,ScrewDriver=%d,VehicleParts=%d,JerryCan=%d",query,
Player[playerid][vPos][0],Player[playerid][vPos][1],Player[playerid][vPos][2],Player[playerid][vPos][3],Player[playerid][vPos][4],Player[playerid][vPos][5],Player[playerid][vPos][6],Player[playerid][vPos][8],Player[playerid][vPos][9],Player[playerid][vPos][10],
Player[playerid][vPos][11],Player[playerid][vPos][12],Player[playerid][vPos][13],Player[playerid][vPos][14]);
format(query, sizeof(query), "%s,v1PosR=%f,v2PosR=%f,v3PosR=%f,v4PosR=%f,v5PosR=%f,v1PaintJob=%d,v2PaintJob=%d,v3PaintJob=%d,v4PaintJob=%d,v5PaintJob=%d,HasSeenTutorial=%d,VipRank=%d,VipTokens=%d WHERE ID = %d",query,
Player[playerid][vPosR][0],Player[playerid][vPosR][1],Player[playerid][vPosR][2],Player[playerid][vPosR][3],Player[playerid][vPosR][4],Player[playerid][vPaintJobs][0],Player[playerid][vPaintJobs][1],Player[playerid][vPaintJobs][2],Player[playerid][vPaintJobs][3],
Player[playerid][vPaintJobs][4],Player[playerid][HasSeenTutorial],Player[playerid][VipRank],Player[playerid][VipTokens],Player[playerid][DataID]);
mysql_query(query);
}
SELECT (...), weapons.* FROM players LEFT JOIN weapons ON weapons.playerID = players.ID WHERE players.ID = X |