input line too long... MySQL ;/
#1

Hi.
I have problem.
I make vehicle mod save (17 tabels).

Updating the tables looks like:
PHP код:
stock ZapiszTuning(VehicleId)
{
    
format(Querysizeof(Query), "UPDATE `Pojazdy` SET `Tuning1` = '%d', `Tuning2` = '%d', `Tuning3` = '%d', `Tuning4` = '%d', `Tuning5` = '%d', `Tuning6` = '%d', `Tuning7` = '%d', \
        `Tuning8` = '%d', `Tuning9` = '%d', `Tuning10` = '%d' , `Tuning11` = '%d', `Tuning12` = '%d', `Tuning13` = '%d', `Tuning14` = '%d', `Tuning15` = '%d', `Tuning16` = '%d', \
        `Tuning17` = '%d' WHERE `IdAuta` = '%d'"
Pojazd[VehicleId][Tuning1], Pojazd[VehicleId][Tuning2], Pojazd[VehicleId][Tuning3], Pojazd[VehicleId][Tuning4], \
        
Pojazd[VehicleId][Tuning5], Pojazd[VehicleId][Tuning6],    Pojazd[VehicleId][Tuning7],    Pojazd[VehicleId][Tuning8], Pojazd[VehicleId][Tuning9], Pojazd[VehicleId][Tuning10], \
        
Pojazd[VehicleId][Tuning11], Pojazd[VehicleId][Tuning12], Pojazd[VehicleId][Tuning13], Pojazd[VehicleId][Tuning14], Pojazd[VehicleId][Tuning15], \
        
Pojazd[VehicleId][Tuning14], Pojazd[VehicleId][Tuning17], Pojazd[VehicleId][idAuta]
    );
    
mysql_query(Query);

And i get this error:
RSA.pwn(3299) : error 075: input line too long (after substitutions)

Line 3299 is:
PHP код:
`Tuning17` = '%d' WHERE `IdAuta` = '%d'", Pojazd[VehicleId][Tuning1], Pojazd[VehicleId][Tuning2], Pojazd[VehicleId][Tuning3], Pojazd[VehicleId][Tuning4], \ 
Reply
#2

You cant put everything into one like (querty) make it on few like mine


pawn Код:
forward SavePlayerData(playerid);
public SavePlayerData(playerid)
{
    new query[700];
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    format(query, 700, "UPDATE `players` SET `Origin` = '%d', `Sex` = '%d', `FirstLogin` = '%d', `Staff` = '%d' WHERE `username` ='%s' ", AccountInfo[playerid][pOrigin], AccountInfo[playerid][pSex], AccountInfo[playerid][pFirstLogin], AccountInfo[playerid][pStaff], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `Mapper` = '%d', `PosX` = '%f', `PosY` = '%f', `PosZ` = '%f' WHERE `username` ='%s' ", AccountInfo[playerid][pMapper], x, y, z, ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `Interior` = '%d', `SavePos` = '%d',`Member` = '%d' WHERE `username` ='%s' ",  GetPlayerInterior(playerid), AccountInfo[playerid][pSavePos], AccountInfo[playerid][pMember], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `Rank` = '%d', `Bani` = '%d', `Warns` = '%d', `Age` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pRank], AccountInfo[playerid][pBani], AccountInfo[playerid][pWarns], AccountInfo[playerid][pAge], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `CarLic` = '%d', `FlyLic` = '%d', `BoatLic` = '%d', `GunLic` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pCarLic], AccountInfo[playerid][pFlyLic], AccountInfo[playerid][pBoatLic], AccountInfo[playerid][pGunLic], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `AccesDMV` = '%d', `UpgradeAge` = '%d', `Skin` = '%d', `Bilet` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pAccesDMV], AccountInfo[playerid][pUpgradeAge], AccountInfo[playerid][pSkin], AccountInfo[playerid][pBilet], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `Ban` = '%d', `Job` = '%d', `JobEchipat` = '%d', `JobFinish` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pBan], AccountInfo[playerid][pJob], AccountInfo[playerid][pJobEchipat], AccountInfo[playerid][pJobFinish], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `JobPlata` = '%d', `JobTimed` = '%d', `JobTime` = '%d', `World` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pJobPlata], AccountInfo[playerid][pJobTimed], AccountInfo[playerid][pJobTime], AccountInfo[playerid][pWorld], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `Muted` = '%d', `MuteTime` = '%d', `AmmuTrainTime` = '%d', `PistSkill` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pMuted], AccountInfo[playerid][pMuteTime], AccountInfo[playerid][pAmmuTrainTime], AccountInfo[playerid][pPistSkill], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `SilenSkill` = '%d', `DesertSkill` = '%d', `ShotgSkill` = '%d', `SmgSkill` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pSilenSkill], AccountInfo[playerid][pDesertSkill], AccountInfo[playerid][pShotgSkill], AccountInfo[playerid][pSmgSkill], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `AkSkill` = '%d', `M4Skill` = '%d', `Undite` = '%d', `Rame` = '%d' WHERE `username` ='%s' ",  AccountInfo[playerid][pAkSkill], AccountInfo[playerid][pM4Skill], AccountInfo[playerid][pUndite], AccountInfo[playerid][pRame], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `HouseKey` = '%d', `RentKey` = '%d', `CarKey` = '%d'` WHERE `username` ='%s' ",  AccountInfo[playerid][pPhousekey],  AccountInfo[playerid][pPrentkey], AccountInfo[playerid][pCarKey], ReturnName(playerid));
    mysql_query(query);
    format(query, 700, "UPDATE `players` SET `Scoala` = '%d', `Profil` = '%d', `Romana` = '%d', `RT1` = '%d', WHERE `username` ='%s' ",  AccountInfo[playerid][pScoala],  AccountInfo[playerid][pProfil],  AccountInfo[playerid][pRomana],  AccountInfo[playerid][pRT1], ReturnName(playerid));
    mysql_query(query);
    mysql_free_result();
}
Reply
#3

for expample, so
PHP код:
format(Querysizeof(Query), "UPDATE `Pojazdy` SET `Tuning1` = '%d', `Tuning2` = '%d', `Tuning3` = '%d', `Tuning4` = '%d', `Tuning5` = '%d', \
    `Tuning6` = '%d', `Tuning7` = '%d', `Tuning8` = '%d', `Tuning9` = '%d', WHERE `IdAuta` = '%d'"
,
    
Pojazd[VehicleId][Tuning1], Pojazd[VehicleId][Tuning2], Pojazd[VehicleId][Tuning3], Pojazd[VehicleId][Tuning4],    Pojazd[VehicleId][Tuning5],
    
Pojazd[VehicleId][Tuning6],    Pojazd[VehicleId][Tuning7],    Pojazd[VehicleId][Tuning8], Pojazd[VehicleId][Tuning9], Pojazd[VehicleId][idAuta]
    );
    
mysql_query(Query);
    
    
format(Querysizeof(Query), "UPDATE `Pojazdy` SET `Tuning10` = '%d' , `Tuning11` = '%d', `Tuning12` = '%d', `Tuning13` = '%d', `Tuning14` = '%d', `Tuning15` = '%d', \
        `Tuning16` = '%d', `Tuning17` = '%d' WHERE `IdAuta` = '%d'"
,
        
Pojazd[VehicleId][Tuning10],Pojazd[VehicleId][Tuning11], Pojazd[VehicleId][Tuning12], Pojazd[VehicleId][Tuning13], Pojazd[VehicleId][Tuning14], Pojazd[VehicleId][Tuning15],
        
Pojazd[VehicleId][Tuning14], Pojazd[VehicleId][Tuning17], Pojazd[VehicleId][idAuta]
    );
    
mysql_query(Query); 
Reply
#4

Quote:
Originally Posted by Crazzel
Посмотреть сообщение
for expample, so
PHP код:
format(Querysizeof(Query), "UPDATE `Pojazdy` SET `Tuning1` = '%d', `Tuning2` = '%d', `Tuning3` = '%d', `Tuning4` = '%d', `Tuning5` = '%d', \
    `Tuning6` = '%d', `Tuning7` = '%d', `Tuning8` = '%d', `Tuning9` = '%d', WHERE `IdAuta` = '%d'"
,
    
Pojazd[VehicleId][Tuning1], Pojazd[VehicleId][Tuning2], Pojazd[VehicleId][Tuning3], Pojazd[VehicleId][Tuning4],    Pojazd[VehicleId][Tuning5],
    
Pojazd[VehicleId][Tuning6],    Pojazd[VehicleId][Tuning7],    Pojazd[VehicleId][Tuning8], Pojazd[VehicleId][Tuning9], Pojazd[VehicleId][idAuta]
    );
    
mysql_query(Query);
    
    
format(Querysizeof(Query), "UPDATE `Pojazdy` SET `Tuning10` = '%d' , `Tuning11` = '%d', `Tuning12` = '%d', `Tuning13` = '%d', `Tuning14` = '%d', `Tuning15` = '%d', \
        `Tuning16` = '%d', `Tuning17` = '%d' WHERE `IdAuta` = '%d'"
,
        
Pojazd[VehicleId][Tuning10],Pojazd[VehicleId][Tuning11], Pojazd[VehicleId][Tuning12], Pojazd[VehicleId][Tuning13], Pojazd[VehicleId][Tuning14], Pojazd[VehicleId][Tuning15],
        
Pojazd[VehicleId][Tuning14], Pojazd[VehicleId][Tuning17], Pojazd[VehicleId][idAuta]
    );
    
mysql_query(Query); 
Yes if still show you that error make it on 3 parts !!
Reply
#5

now I know. Thank you very much!
Reply
#6

Quote:
Originally Posted by Crazzel
Посмотреть сообщение
now I know. Thank you very much!
no problem glad it helped you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)