Update Befehl - Error

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey,


    Ich bekomme irgendwie bei meinem Update Befehl einen Error!


    Der String ist auf 5000 und daher ist er doch nicht zu klein:


    Errorcode:

    Spoiler anzeigen
    [09:10:49] CMySQLHandler::Query(UPDATE `accounts` SET `Level`='0',`Adminrank`='2000',Mietslot='0',Mietslot = '0',Supporter = '0',Donator = '0',Upgrade = '0',ConnectedTimer = '0',Neuling = '0',Register = '0', Sex = '0', Alter = '0',Origin = '0', CK = '0', Muted = '0',Knast = '0', Exp = '0',Account* = '0', PlayerKreditTime = '0', PlayerKredit = '0',Crimes = '0', Kills = '0', ImKnast = '0',KnastTimer = '0', Tode = '0', Arrested = '0',WantedTode = '0', Telefonbuch = '0', Lottonr = '0',Fische = '0', Gr.Fisch = '0', Job = '0',PayCheck = '0', Rest = '0', HeadValue = '0',GangJailed = '0', Mauled = '0', Mats = '0',Drugplant = '0', Drugseems = '0', UnDrugs = '0',SLic = '0', Bizid = '0', Tutorial = '0',Bonus = '0', Spareparts = '0', MechaFuel = '0',TresorBomber = '0', Trucker = '0', Hausschlüssel = '0',Bikepunkte = '0', Autopunkte = '0', MatsBootmann = '0',Drogen = '0', Leader = '0', Member = '0',Rank = '0', Char = '0', ContractTime = '0',DeteSkill = '0', SexSkill = '0', BoxSkill = '0',Lawskill = '0', MechaSkill = '0', JackSkill = '0',CarSkill = '0', NewsSkill = '0', DrugsSkill = '0',KochSkill = '0', FischSkill = '0', SpielerLeben = '0.000000',Leben = '0.000000', Interior = '0', Lokal = '0',Team = '0', Model = '0'PNummer = '0',PHauskey = '0', PBizkey = '0', Autolic = '0',NewLic = '0', FlugLic = '0', FischLic = '0',GunLic = '0', pLKWLic = '0', RollerLic = '0',MotoLic = '0', AlcoholPerk = '0', DrugPerk = '0',MiserPerk = '0', PainPerk = '0', TraderPerk = '0',Tut = '0', Radio = '0', Warns = '0',Adjustable = '1', Fuel = '0', Married = '0',Ehepartner = '', InvWeapon = '0', InvAmmo = '0',InvWeapon2 = '0', InvAmmo2 = '0', InvDrugs = '0',InvMats = '0', Flugzeit = '0', Roadblock = '0',PlayMinutes = '1', GesamtMinuten = '1', MinutenSeitLogin = '1',MinutenSeitAnfang = '1', SFPass = '0', LVPass = '0',Guthaben = '0', Vertrag = '0', UhrId = '0',HandyID = '0', OwnPerso = '0', OwnAntrag = '0',PersoStop = '0', Gehalt = '0', FrakSperre = '0',BoxMats = '0', BoxDrugs = '0', PBan = '0',Tot = '0', FarmTime = '0', GDeaths = '0',GKills = '0', HatHaus = '0', Mietet = '0',Spawnanders = '0', Meldung = '0', Housekey = '0',RentHouseKey = '0', Story = '2', JobTime = '0') - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Alter = '0',Origin = '0', CK = '0', Muted = '0',Knast = '0', Exp = '0',Account* ' at line 1)


    Zeilen(ca 30)


    format(string, sizeof(string), "UPDATE `accounts` SET `Level`='%i',`Adminrank`='%i',Mietslot='%i',", PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pMietSlot]);
    format(buffer, sizeof(buffer), "Mietslot = '%i',Supporter = '%i',Donator = '%i',",PlayerInfo[playerid][pMietSlot],PlayerInfo[playerid][pSupporter],PlayerInfo[playerid][pDonateRank]);
    strcat(string, buffer);
    format(buffer, sizeof(buffer),"Upgrade = '%i',ConnectedTimer = '%i',Neuling = '%i',",PlayerInfo[playerid][gPupgrade],PlayerInfo[playerid][pConnectTime],PlayerInfo[playerid][pNeuling]);
    strcat(string,buffer);
    format(buffer, sizeof(buffer),"Register = '%i', Sex = '%i', Alter = '%i',",PlayerInfo[playerid][pReg],PlayerInfo[playerid][pSex],PlayerInfo[playerid][pReg]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Origin = '%i', CK = '%i', Muted = '%i',",PlayerInfo[playerid][pOrigin],PlayerInfo[playerid][pCK], PlayerInfo[playerid][pMuted]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Knast = '%i', Exp = '%i',", PlayerInfo[playerid][pKnast],PlayerInfo[playerid][pExp],1);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Account* = '%i', PlayerKreditTime = '%i', PlayerKredit = '%i',",PlayerInfo[playerid][pAccount],PlayerInfo[playerid][pPlayerKreditDauer],PlayerInfo[playerid][pPlayerKredit]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Crimes = '%i', Kills = '%i', ImKnast = '%i',",PlayerInfo[playerid][pCrimes],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pJailed]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"KnastTimer = '%i', Tode = '%i', Arrested = '%i',",PlayerInfo[playerid][pJailTime],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pArrested]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"WantedTode = '%i', Telefonbuch = '%i', Lottonr = '%i',",PlayerInfo[playerid][pWantedDeaths], PlayerInfo[playerid][pPhoneBook], PlayerInfo[playerid][pLottoNr]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Fische = '%i', Gr.Fisch = '%i', Job = '%i',",PlayerInfo[playerid][pFishes],PlayerInfo[playerid][pBiggestFish],PlayerInfo[playerid][pJob]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"PayCheck = '%i', Rest = '%i', HeadValue = '%i',",PlayerInfo[playerid][pPayCheck],PlayerInfo[playerid][pRest],PlayerInfo[playerid][pHeadValue]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"GangJailed = '%i', Mauled = '%i', Mats = '%i',",PlayerInfo[playerid][pGangJailed],PlayerInfo[playerid][pMauled],PlayerInfo[playerid][pMats]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Drugplant = '%i', Drugseems = '%i', UnDrugs = '%i',",PlayerInfo[playerid][pDrugplants],PlayerInfo[playerid][pDrugseems],PlayerInfo[playerid][pUnDrugs]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"SLic = '%i', Bizid = '%i', Tutorial = '%i',",PlayerInfo[playerid][pSLic],PlayerInfo[playerid][pBizid],PlayerInfo[playerid][pTutorial]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Bonus = '%i', Spareparts = '%i', MechaFuel = '%i',",PlayerInfo[playerid][pBonus],PlayerInfo[playerid][pSP],PlayerInfo[playerid][pMechaF]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"TresorBomber = '%i', Trucker = '%i', Hausschlüssel = '%i',", PlayerInfo[playerid][pBombe],PlayerInfo[playerid][pTrucker],PlayerInfo[playerid][pHauskey]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Bikepunkte = '%i', Autopunkte = '%i', MatsBootmann = '%i',", PlayerInfo[playerid][pBikepunkte], PlayerInfo[playerid][pAutopunkte],PlayerInfo[playerid][pBootsmann]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Drogen = '%i', Leader = '%i', Member = '%i',",PlayerInfo[playerid][pDrugs],PlayerInfo[playerid][pLeader],PlayerInfo[playerid][pMember]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Rank = '%i', Char = '%i', ContractTime = '%i',", PlayerInfo[playerid][pRank], PlayerInfo[playerid][pChar], PlayerInfo[playerid][pContractTime]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"DeteSkill = '%i', SexSkill = '%i', BoxSkill = '%i',",PlayerInfo[playerid][pDetSkill],PlayerInfo[playerid][pSexSkill],PlayerInfo[playerid][pBoxSkill]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Lawskill = '%i', MechaSkill = '%i', JackSkill = '%i',",PlayerInfo[playerid][pLawSkill],PlayerInfo[playerid][pMechSkill],PlayerInfo[playerid][pJackSkill]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"CarSkill = '%i', NewsSkill = '%i', DrugsSkill = '%i',",PlayerInfo[playerid][pCarSkill],PlayerInfo[playerid][pNewsSkill],PlayerInfo[playerid][pDrugsSkill]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"KochSkill = '%i', FischSkill = '%i', SpielerLeben = '%f',",PlayerInfo[playerid][pCookSkill], PlayerInfo[playerid][pFishSkill],PlayerInfo[playerid][pHealth]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Leben = '%f', Interior = '%i', Lokal = '%i',",PlayerInfo[playerid][pSHealth],PlayerInfo[playerid][pInt],PlayerInfo[playerid][pLocal]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Team = '%i', Model = '%i'PNummer = '%i',",PlayerInfo[playerid][pTeam],PlayerInfo[playerid][pModel],PlayerInfo[pPnumber]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"PHauskey = '%i', PBizkey = '%i', Autolic = '%i',",PlayerInfo[playerid][pPhousekey],PlayerInfo[playerid][pPbiskey],PlayerInfo[playerid][pCarLic]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"NewLic = '%i', FlugLic = '%i', FischLic = '%i',",PlayerInfo[playerid][pNewLic],PlayerInfo[playerid][pFlyLic],PlayerInfo[playerid][pFishLic]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"GunLic = '%i', pLKWLic = '%i', RollerLic = '%i',",PlayerInfo[playerid][pGunLic],PlayerInfo[playerid][pLKWLic],PlayerInfo[playerid][pRollerLic]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"MotoLic = '%i', AlcoholPerk = '%i', DrugPerk = '%i',",PlayerInfo[playerid][pMotoLic],PlayerInfo[playerid][pAlcoholPerk],PlayerInfo[playerid][pDrugPerk]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"MiserPerk = '%i', PainPerk = '%i', TraderPerk = '%i',",PlayerInfo[playerid][pMiserPerk],PlayerInfo[playerid][pPainPerk],PlayerInfo[playerid][pTraderPerk]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Tut = '%i', Radio = '%i', Warns = '%i',",PlayerInfo[playerid][pTut],PlayerInfo[playerid][pRadio],PlayerInfo[playerid][pWarns]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Adjustable = '%i', Fuel = '%i', Married = '%i',",PlayerInfo[playerid][pAdjustable],PlayerInfo[playerid][pFuel],PlayerInfo[playerid][pMarried]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Ehepartner = '%s', InvWeapon = '%i', InvAmmo = '%i',",PlayerInfo[playerid][pMarriedTo],PlayerInfo[playerid][pInvWeapon],PlayerInfo[playerid][pInvAmmo]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"InvWeapon2 = '%i', InvAmmo2 = '%i', InvDrugs = '%i',",PlayerInfo[playerid][pInvWeapon2],PlayerInfo[playerid][pInvAmmo],PlayerInfo[playerid][pInvDrugs]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"InvMats = '%i', Flugzeit = '%i', Roadblock = '%i',",PlayerInfo[playerid][pInvMats],PlayerInfo[playerid][pFlugTime],PlayerInfo[playerid][pRoadblock]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"PlayMinutes = '%i', GesamtMinuten = '%i', MinutenSeitLogin = '%i',",PlayerInfo[playerid][pPlayMinutes],PlayerInfo[playerid][pGesamtMinutes],PlayerInfo[playerid][pMinutesSinceLogin]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"MinutenSeitAnfang = '%i', SFPass = '%i', LVPass = '%i',",PlayerInfo[playerid][pMinutesSinceAn],PlayerInfo[playerid][pSFPASS],PlayerInfo[playerid][pLVPASS]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Guthaben = '%i', Vertrag = '%i', UhrId = '%i',",PlayerInfo[playerid][pHandyGeld],PlayerInfo[playerid][pHandyVer],PlayerInfo[playerid][pUhrID]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"HandyID = '%i', OwnPerso = '%i', OwnAntrag = '%i',",PlayerInfo[playerid][pHandyID],PlayerInfo[playerid][pOwnPerso],PlayerInfo[playerid][pOwnAntrag]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"PersoStop = '%i', Gehalt = '%i', FrakSperre = '%i',",PlayerInfo[playerid][pPersoStop],PlayerInfo[playerid][pGehalt],PlayerInfo[playerid][pFrakSperre]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"BoxMats = '%i', BoxDrugs = '%i', PBan = '%i',",PlayerInfo[playerid][pBoxMats],PlayerInfo[playerid][pBoxDrugs],PlayerInfo[playerid][pban]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Tot = '%i', FarmTime = '%i', GDeaths = '%i',",PlayerInfo[playerid][pTot], PlayerInfo[playerid][pFarmTime], PlayerInfo[playerid][pGDeaths]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"GKills = '%i', HatHaus = '%i', Mietet = '%i',",PlayerInfo[playerid][pGKills], PlayerInfo[playerid][pHatHaus], PlayerInfo[playerid][pMietet]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"Spawnanders = '%i', Meldung = '%i', Housekey = '%i',",PlayerInfo[playerid][pSpawnanders],PlayerInfo[playerid][pMeldung],PlayerInfo[playerid][pHouseKey]);
    strcat(string,buffer);
    format(buffer,sizeof(buffer),"RentHouseKey = '%i', Story = '%i', JobTime = '%i'",PlayerInfo[playerid][pRentHouseKey],PlayerInfo[playerid][pStory], PlayerInfo[playerid][pJobTime]);
    strcat(string,buffer);
    mysql_query(string);


    Danke an eure Hilfe

  • Der Error sagt dir doch, dass du einen Error in der Syntax der Abfrage hast ;)
    Und der Error sagt dir auch noch wo genau :D

    Code
    'Alter = '0',Origin = '0', CK = '0', Muted = '0',Knast = '0', Exp = '0',Account* ' at line 1


    Ich würde vermuten, dass es das Sternchen nach Account ist..
    Evtl. musst du die Spaltennamen auch mal mit diesen `` umranden. Also z.B. `Muted` = '0'

  • Der Error sagt dir doch, dass du einen Error in der Syntax der Abfrage hast ;)
    Und der Error sagt dir auch noch wo genau :D

    Code
    'Alter = '0',Origin = '0', CK = '0', Muted = '0',Knast = '0', Exp = '0',Account* ' at line 1


    Ich würde vermuten, dass es das Sternchen nach Account ist..
    Evtl. musst du die Spaltennamen auch mal mit diesen `` umranden. Also z.B. `Muted` = '0'


    Mir wurde gesagt das ist nicht zwingend Notwendig


    Edit: Geht nicht das bricht dann ab?

  • Entferne mal den * hinter Account so wie hier:
    format(buffer,sizeof(buffer),"Account = '%i', PlayerKreditTime = '%i', PlayerKredit = '%i',",PlayerInfo[playerid][pAccount],PlayerInfo[playerid][pPlayerKreditDauer],PlayerInfo[playerid][pPlayerKredit]);

  • Entferne mal den * hinter Account so wie hier:
    format(buffer,sizeof(buffer),"Account = '%i', PlayerKreditTime = '%i', PlayerKredit = '%i',",PlayerInfo[playerid][pAccount],PlayerInfo[playerid][pPlayerKreditDauer],PlayerInfo[playerid][pPlayerKredit]);


    Habe ich :


    Aber früher mi mysql_setint ging auch aber egal ich habe jez noch überal ``gemacht lets test


    Again:


    Zitat

    - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`PNummer` = '0',`PHauskey` = '0', `PBizkey` = '0', `Autolic` = '0',`NewLic` = '0' at line 1)


    @|Prototype|: Hast du ne Antwort

    Einmal editiert, zuletzt von NicoWiss ()