MySQL Syntax 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
  • Guten Abend.
    Habe folgendes Problem:
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `cars` SET `ingarage`=0,`AH_Typ`=-1,`AH_X`='0.000000',`AH_Y`='0.000000',`AH_Z`='0.000000',`AH_Rot`='0.000000',`AH_Status`=0,`AH_Lock`=0,`AH_Paintjob`=-1,`Farbe1`=-1,`Farbe2`=-1,`AH_mod1`=-1,`AH_mod2`=-1,`AH_mod3`=-1,`AH_mod4`=-1,`AH_mod5`=-1,`AH_mod6`=-1,`AH_mod7`=-1,`AH_mod8`=-1,`AH_mod9`=-1,`AH_mod10`=-1,`AH_mod11`=-1,`AH_mod12`=-1,`AH_mod13`=-1,`AH_mod14`=-1,`AH_mod15`=-1,`AH_mod16`=-1,`AH_mod17`=-1,`AH_SpawnSaveX`=0.000000,`AH_SpawnSaveY`='0.000000',`AH_SpawnSaveZ`='0.000000',`AH_SpawnSaveRot`='0.000000',`AH_TankVolumen`=0,`AH_Mats`=0,`AH_Neon`=0,`AH_NeonType`=0,`AH_Drugs`=0,`AH_Versicherung`=0,`AH_StandTime`=0,`AH_Meter`=1 WHERE `sqlid`=0 AND `carkey`=) - 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 '' at line 1)
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `cars` SET `ingarage`=0,`AH_Typ`=-1,`AH_X`='0.000000',`AH_Y`='0.000000',`AH_Z`='0.000000',`AH_Rot`='0.000000',`AH_Status`=0,`AH_Lock`=0,`AH_Paintjob`=-1,`Farbe1`=-1,`Farbe2`=-1,`AH_mod1`=-1,`AH_mod2`=-1,`AH_mod3`=-1,`AH_mod4`=-1,`AH_mod5`=-1,`AH_mod6`=-1,`AH_mod7`=-1,`AH_mod8`=-1,`AH_mod9`=-1,`AH_mod10`=-1,`AH_mod11`=-1,`AH_mod12`=-1,`AH_mod13`=-1,`AH_mod14`=-1,`AH_mod15`=-1,`AH_mod16`=-1,`AH_mod17`=-1,`AH_SpawnSaveX`=0.000000,`AH_SpawnSaveY`='0.000000',`AH_SpawnSaveZ`='0.000000',`AH_SpawnSaveRot`='0.000000',`AH_TankVolumen`=0,`AH_Mats`=0,`AH_Neon`=0,`AH_NeonType`=0,`AH_Drugs`=0,`AH_Versicherung`=0,`AH_StandTime`=0,`AH_Meter`=1 WHERE `sqlid`=1 AND `carkey`=) - 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 '' at line 1)
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `cars` SET `ingarage`=0,`AH_Typ`=-1,`AH_X`='0.000000',`AH_Y`='0.000000',`AH_Z`='0.000000',`AH_Rot`='0.000000',`AH_Status`=0,`AH_Lock`=0,`AH_Paintjob`=-1,`Farbe1`=-1,`Farbe2`=-1,`AH_mod1`=-1,`AH_mod2`=-1,`AH_mod3`=-1,`AH_mod4`=-1,`AH_mod5`=-1,`AH_mod6`=-1,`AH_mod7`=-1,`AH_mod8`=-1,`AH_mod9`=-1,`AH_mod10`=-1,`AH_mod11`=-1,`AH_mod12`=-1,`AH_mod13`=-1,`AH_mod14`=-1,`AH_mod15`=-1,`AH_mod16`=-1,`AH_mod17`=-1,`AH_SpawnSaveX`=0.000000,`AH_SpawnSaveY`='0.000000',`AH_SpawnSaveZ`='0.000000',`AH_SpawnSaveRot`='0.000000',`AH_TankVolumen`=0,`AH_Mats`=0,`AH_Neon`=0,`AH_NeonType`=0,`AH_Drugs`=0,`AH_Versicherung`=0,`AH_StandTime`=0,`AH_Meter`=1 WHERE `sqlid`=2 AND `carkey`=) - 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 '' at line 1)
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `users` SET `Key`='123456', `Level`='3', `AdminLevel`='2000', `DonateRank`='1', `UpgradePoints`='0', `ConnectedTime`='20', `Registered`='1', `Sex`='1', `Age`='17', `Origin`='1', `Muted`='0', `Respect`='13', `Money`='2240976', `Bank`='10882', `Allowed`='0', `wgs`='0', `Crimes`='4', `Kills`='4', `sKills`='3', `Deaths`='19', `Arrested`='0', `ArrestTime`='0', `PhoneBook`='0', `LottoNr`='0', `Fishes`='0', `BiggestFish`='0', `Job`='19', `Paycheck`='0' WHERE `Name`='Heaven') - Successfully executed.
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `users` SET `HeadValue`='0', `Jailed`='0', `JailTime`='0', `Leader`='0', `Member`='0', `Rank`='12', `Skin`='3', `Vertragszeit`='0', `DetSkill`='0', `SexSkill`='0', `LawSkill`='0', `MechSkill`='0', `JackSkill`='0' WHERE `Name`='Heaven') - Successfully executed.
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `users` SET `CarSkill`='0', `NewsSkill`='0', `DrugsSkill`='0', `CookSkill`='0', `FishSkill`='0', `pSHealth`='50.0', `PhoneNr`='0', `House`='-1', `Biz`='-1', `CarLic`='1', `FlyLic`='0', `BoatLic`='0', `FishLic`='0', `GunLic`='0', `Zollpass`='0' WHERE `Name`='Heaven') - Successfully executed.
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `users` SET `Gun1`='0', `Gun2`='0', `Gun3`='0', `Gun4`='0', `Ammo1`='0', `Ammo2`='0', `Ammo3`='0', `Ammo4`='0', `CarTime`='0', `PayDay`='54', `PayDayHad`='0', `CDPlayer`='0', `AlcoholPerk`='0', `PainKillerPerk`='0', `DrugPerk`='0', `MiserPerk`='0', `TraderPerk`='0', `Tutorial`='1', `Warnings`='0' WHERE `Name`='Heaven') - Successfully executed.
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `users` SET `Fuel`='0', `Married`='0', `MarriedTo`='Niemand', `WantedLevel`='2', `Spawn`='0', `SavedMaterials`='0', `SavedDrugs`='0', `BikeLic`='0', `LKWLic`='0', `DonatorTime`='-1', `WerberName`='geht hier', `FightingStyle`='0', `Handy`='0' WHERE `Name`='Heaven') - Successfully executed.
    [22:09:01] >> mysql_query( Connection handle: 1 )
    [22:09:01] CMySQLHandler::Query(UPDATE `users` SET `OnDutySkin`='0', `CarLicPoints`='0', `BikeLicPoints`='0', `warntime1`='0', `warntime2`='0', `Ticketsopen`='0', `DonatorTime`='-1', `OldName`='NULL', `ClientIP`='109.193.63.11', `OrgMember`='-1', `OrgLeader`='-1', `OrgName`='Keine'`Onlinne`=''`Festgeld`=12000`Festgeldpd`=0`BusSkill`=0`Paket`=0`Krankenhaus`=0 WHERE `Name`='Heaven') - 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 '`Onlinne`=''`Festgeld`=12000`Festgeldpd`=0`BusSkill`=0`Paket`=0`Krankenhaus`=0 W' at line 1)
    [22:09:01] OnQueryError() - Called.
    [22:09:01] OnQueryError() - Called.
    [22:09:01] OnQueryError() - Called.
    [22:09:01] OnQueryError() - Called.


    Was mach ich falsch?

  • Wofür wird denn der Query geloggt? Damit Du ihn Dir anschaust.
    Und was fällt direkt auf?

    SQL
    `carkey`=)


    Da fehlt der Wert.


    Mir gehts mehr um das:
    [22:41:27] CMySQLHandler::Query(UPDATE `users` SET `Fuel`='0', `Married`='0', `MarriedTo`='Niemand', `WantedLevel`='2', `Spawn`='0', `SavedMaterials`='0', `SavedDrugs`='0', `BikeLic`='0', `LKWLic`='0', `DonatorTime`='-1', `WerberName`='geht hier', `FightingStyle`='0', `Handy`='0' WHERE `Name`='Heaven') - Successfully executed.
    [22:41:27] >> mysql_query( Connection handle: 1 )
    [22:41:27] CMySQLHandler::Query(UPDATE `users` SET `OnDutySkin`='0', `CarLicPoints`='0', `BikeLicPoints`='0', `warntime1`='0', `warntime2`='0', `Ticketsopen`='0', `DonatorTime`='-1', `OldName`='NULL', `ClientIP`='109.193.63.11', `OrgMember`='-1', `OrgLeader`='-1', `OrgName`='Keine'`Festgeld`=12000`Festgeldpd`=0`BusSkill`=0`Paket`=0`Krankenhaus`=0 WHERE `Name`='Heaven') - 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 '`Festgeld`=12000`Festgeldpd`=0`BusSkill`=0`Paket`=0`Krankenhaus`=0 WHERE `Name`=' at line 1)
    [22:41:27] OnQueryError() - Called.
    [22:41:27] OnQueryError() - Called.
    [22:41:27] OnQueryError() - Called.
    [22:41:27] OnQueryError() - Called.



    format(var, sizeof(var), "`Festgeld`=%d", PlayerInfo[playerid][pFestgeld]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Festgeldpd`=%d", PlayerInfo[playerid][pFestPD]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BusSkill`=%d", PlayerInfo[playerid][pBusSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Paket`=%d", PlayerInfo[playerid][pPaket]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Krankenhaus`=%d", PlayerInfo[playerid][pKrankenhaus]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);

  • Du hast nach

    SQL
    `OrgName`='Keine'


    keine Kommata mehr im Query, die die einzelnen Felder trennen.


    Hab das ganze so:
    format(var, sizeof(var), "`OrgName`='%s'", PlayerInfo[playerid][pOrgaName]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Festgeld`='%d'", PlayerInfo[playerid][pFestgeld]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Festgeldpd`='%d'", PlayerInfo[playerid][pFestPD]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BusSkill`='%d'", PlayerInfo[playerid][pBusSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Paket`='%d'", PlayerInfo[playerid][pPaket]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Krankenhaus`='%d'", PlayerInfo[playerid][pKrankenhaus]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);

  • Du hast den Code hier doch zweimal gepostet, genau da findest Du den Query.


    Nein
    public PlayerUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(IsPlayerNPC(playerid))
    {
    return 1;
    }
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    new endstring[1600];
    new var[129];
    format(endstring, sizeof(endstring), "UPDATE `users` SET ");
    format(var, sizeof(var), "`Key`='%s', ", PlayerInfo[playerid][pKey]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Level`='%d', ", PlayerInfo[playerid][pLevel]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`AdminLevel`='%d', ", PlayerInfo[playerid][pAdmin]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`DonateRank`='%d', ", PlayerInfo[playerid][pDonatorRank]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`UpgradePoints`='%d', ", PlayerInfo[playerid][gPupgrade]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`ConnectedTime`='%d', ", PlayerInfo[playerid][pConnectTime]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Registered`='%d', ", PlayerInfo[playerid][pReg]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Sex`='%d', ", PlayerInfo[playerid][pSex]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Age`='%d', ", PlayerInfo[playerid][pAlter]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Origin`='%d', ", PlayerInfo[playerid][pOrigin]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Muted`='%d', ", PlayerInfo[playerid][pMuted]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Respect`='%d', ", PlayerInfo[playerid][pRespekt]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Money`='%d', ", PlayerInfo[playerid][pCash]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Bank`='%d', ", PlayerInfo[playerid][pBank]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Allowed`='%d', ", PlayerInfo[playerid][pAllowed]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`wgs`='%d', ", PlayerInfo[playerid][pwgs]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Crimes`='%d', ", PlayerInfo[playerid][pCrimes]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Kills`='%d', ", PlayerInfo[playerid][pKills]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`sKills`='%d', ", PlayerInfo[playerid][psKills]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Deaths`='%d', ", PlayerInfo[playerid][pDeaths]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Arrested`='%d', ", PlayerInfo[playerid][pArrested]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`ArrestTime`='%d', ", PlayerInfo[playerid][pArrestTime]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`PhoneBook`='%d', ", PlayerInfo[playerid][pPhoneBook]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`LottoNr`='%d', ", PlayerInfo[playerid][pLottoNr]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Fishes`='%d', ", PlayerInfo[playerid][pFishes]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BiggestFish`='%d', ", PlayerInfo[playerid][pBiggestFish]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Job`='%d', ", PlayerInfo[playerid][pJob]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Paycheck`='%d'", PlayerInfo[playerid][pPayCheck]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);



    format(endstring, sizeof(endstring), "UPDATE `users` SET ");
    format(var, sizeof(var), "`HeadValue`='%d', ", PlayerInfo[playerid][pContract]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Jailed`='%d', ", PlayerInfo[playerid][pJailed]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`JailTime`='%d', ", PlayerInfo[playerid][pJailTime]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Leader`='%d', ", PlayerInfo[playerid][pLeader]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Member`='%d', ", PlayerInfo[playerid][pMember]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Rank`='%d', ", PlayerInfo[playerid][pRank]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Skin`='%d', ", PlayerInfo[playerid][pChar]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Vertragszeit`='%d', ", PlayerInfo[playerid][pVertragszeit]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`DetSkill`='%d', ", PlayerInfo[playerid][pDetSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`SexSkill`='%d', ", PlayerInfo[playerid][pSexSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`LawSkill`='%d', ", PlayerInfo[playerid][pAnwaltSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`MechSkill`='%d', ", PlayerInfo[playerid][pMechSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`JackSkill`='%d'", PlayerInfo[playerid][pJackSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);


    format(endstring, sizeof(endstring), "UPDATE `users` SET ");
    format(var, sizeof(var), "`CarSkill`='%d', ", PlayerInfo[playerid][pCarSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`NewsSkill`='%d', ", PlayerInfo[playerid][pNewsSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`DrugsSkill`='%d', ", PlayerInfo[playerid][pDrugsSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`CookSkill`='%d', ", PlayerInfo[playerid][pCookSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`FishSkill`='%d', ", PlayerInfo[playerid][pFishSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`pSHealth`='%.1f', ", PlayerInfo[playerid][pSHealth]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`PhoneNr`='%d', ", PlayerInfo[playerid][pNummer]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`House`='%d', ", PlayerInfo[playerid][pPhousekey]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Biz`='%d', ", PlayerInfo[playerid][pBizKey]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`CarLic`='%d', ", PlayerInfo[playerid][pCarLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`FlyLic`='%d', ", PlayerInfo[playerid][pFlyLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BoatLic`='%d', ", PlayerInfo[playerid][pBoatLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`FishLic`='%d', ", PlayerInfo[playerid][pFishLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`GunLic`='%d', ", PlayerInfo[playerid][pGunLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Zollpass`='%d'", PlayerInfo[playerid][pZollpass]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);





    format(endstring, sizeof(endstring), "UPDATE `users` SET ");
    format(var, sizeof(var), "`Gun1`='%d', ", PlayerInfo[playerid][pGun1]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Gun2`='%d', ", PlayerInfo[playerid][pGun2]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Gun3`='%d', ", PlayerInfo[playerid][pGun3]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Gun4`='%d', ", PlayerInfo[playerid][pGun4]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Ammo1`='%d', ", PlayerInfo[playerid][pAmmo1]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Ammo2`='%d', ", PlayerInfo[playerid][pAmmo2]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Ammo3`='%d', ", PlayerInfo[playerid][pAmmo3]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Ammo4`='%d', ", PlayerInfo[playerid][pAmmo4]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`CarTime`='%d', ", PlayerInfo[playerid][pCarTime]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`PayDay`='%d', ", PlayerInfo[playerid][pPayDay]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`PayDayHad`='%d', ", PlayerInfo[playerid][pPayDayHad]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`CDPlayer`='%d', ", PlayerInfo[playerid][pCDPlayer]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`AlcoholPerk`='%d', ", PlayerInfo[playerid][pAlcoholPerk]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`PainKillerPerk`='%d', ", PlayerInfo[playerid][pPainKillerPerk]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`DrugPerk`='%d', ", PlayerInfo[playerid][pDrugPerk]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`MiserPerk`='%d', ", PlayerInfo[playerid][pMiserPerk]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`TraderPerk`='%d', ", PlayerInfo[playerid][pTraderPerk]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Tutorial`='%d', ", PlayerInfo[playerid][pTut]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Warnings`='%d'", PlayerInfo[playerid][pWarns]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);


    format(endstring, sizeof(endstring), "UPDATE `users` SET ");
    format(var, sizeof(var), "`Fuel`='%d', ", PlayerInfo[playerid][pFuel]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Married`='%d', ", PlayerInfo[playerid][pMarried]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`MarriedTo`='%s', ", PlayerInfo[playerid][pMarriedTo]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`WantedLevel`='%d', ", PlayerInfo[playerid][pWantedLevel]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Spawn`='%d', ", PlayerInfo[playerid][pSpawn]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`SavedMaterials`='%d', ", PlayerInfo[playerid][pSaveMats]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`SavedDrugs`='%d', ", PlayerInfo[playerid][pSaveDrugs]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BikeLic`='%d', ", PlayerInfo[playerid][pBikeLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`LKWLic`='%d', ", PlayerInfo[playerid][pLKWLic]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`DonatorTime`='%d', ", PlayerInfo[playerid][pDonatorZeit]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`WerberName`='%s', ", PlayerInfo[playerid][pWerberName]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`FightingStyle`='%d', ", PlayerInfo[playerid][pFightingStyle]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Handy`='%d'", PlayerInfo[playerid][pHandy]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);


    format(endstring, sizeof(endstring), "UPDATE `users` SET ");
    format(var, sizeof(var), "`OnDutySkin`='%d', ", PlayerInfo[playerid][pOnDutySkin]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`CarLicPoints`='%d', ", PlayerInfo[playerid][pCarLicPoints]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BikeLicPoints`='%d', ", PlayerInfo[playerid][pBikeLicPoints]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`warntime1`='%d', ", PlayerInfo[playerid][pWarnTime1]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`warntime2`='%d', ", PlayerInfo[playerid][pWarnTime2]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Ticketsopen`='%d', ", PlayerInfo[playerid][pTicketsopen]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`DonatorTime`='%d', ", PlayerInfo[playerid][pDonatorZeit]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`OldName`='%s', ", PlayerInfo[playerid][pOldName]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`ClientIP`='%s', ", PlayerInfo[playerid][pUserIP]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`OrgMember`='%d', ", PlayerInfo[playerid][pOrgaID]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`OrgLeader`='%d', ", PlayerInfo[playerid][pOrgaLeader]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`OrgName`='%s'", PlayerInfo[playerid][pOrgaName]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Festgeld`='%d'", PlayerInfo[playerid][pFestgeld]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Festgeldpd`='%d'", PlayerInfo[playerid][pFestPD]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BusSkill`='%d'", PlayerInfo[playerid][pBusSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Paket`='%d'", PlayerInfo[playerid][pPaket]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Krankenhaus`='%d'", PlayerInfo[playerid][pKrankenhaus]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s'", playername);
    strcat(endstring, var, sizeof(endstring));
    self_mysql_query(endstring);
    new string[128];

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Du musst schlicht und einfach ein Komma hinter

    SQL
    `Krankenhaus`='%d'


    machen und das bei jedem anderen auch, sofern nicht schon vorhanden (bei einigen hast Du es ja gemacht), außer beim Wert vor dem WHERE Keyword.


    Das das so:
    format(var, sizeof(var), "`Festgeld`='%d',", PlayerInfo[playerid][pFestgeld]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Festgeldpd`='%d',", PlayerInfo[playerid][pFestPD]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`BusSkill`='%d',", PlayerInfo[playerid][pBusSkill]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Paket`='%d',", PlayerInfo[playerid][pPaket]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), "`Krankenhaus`='%d',", PlayerInfo[playerid][pKrankenhaus]);
    strcat(endstring, var, sizeof(endstring));
    format(var, sizeof(var), " WHERE `Name`='%s',", playername);


    Errors bleiben jedoch

  • Dann zeig nochmal die Errors.


    [00:49:18] CMySQLHandler::Query(UPDATE `users` SET `OnDutySkin`='0', `CarLicPoints`='0', `BikeLicPoints`='0', `warntime1`='0', `warntime2`='0', `Ticketsopen`='0', `DonatorTime`='-1', `OldName`='NULL', `ClientIP`='109.193.63.11', `OrgMember`='-1', `OrgLeader`='-1', `OrgName`='Keine',`Festgeld`='12000',`Festgeldpd`='0',`BusSkill`='0',`Paket`='0',`Krankenhaus`='0', WHERE `Name`='Heaven',) - 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 'WHERE `Name`='Heaven',' at line 1)
    [00:49:18] OnQueryError() - Called.
    [00:49:18] OnQueryError() - Called.
    [00:49:18] OnQueryError() - Called.
    [00:49:18] OnQueryError() - Called.
    [00:49:40] >> mysql_ping( Connection handle: 1 )
    [00:49:40] CMySQLHandler::Ping() - Connection is still alive.
    [00:50:37] >> mysql_ping( Connection handle: 1 )
    [00:50:37] CMySQLHandler::Ping() - Connection is still alive.
    [00:51:34] >> mysql_ping( Connection handle: 1 )
    [00:51:34] CMySQLHandler::Ping() - Connection is still alive.
    [00:52:30] >> mysql_ping( Connection handle: 1 )
    [00:52:30] CMySQLHandler::Ping() - Connection is still alive.
    [00:53:27] >> mysql_ping( Connection handle: 1 )
    [00:53:27] CMySQLHandler::Ping() - Connection is still alive.

  • Aus dem Grund, das nach den beiden Werten nichts mehr kommt. Möchtest du nach `Krankenhaus`='0' noch was einfügen, dann muss dort ein Komma hin, sonst nicht.

  • Aus dem Grund, das nach den beiden Werten nichts mehr kommt. Möchtest du nach `Krankenhaus`='0' noch was einfügen, dann muss dort ein Komma hin, sonst nicht.


    Ok Error bleibt:
    [11:13:15] CMySQLHandler::Query(UPDATE `users` SET `OnDutySkin`='0', `CarLicPoints`='0', `BikeLicPoints`='0', `warntime1`='0', `warntime2`='0', `Ticketsopen`='0', `DonatorTime`='-1', `OldName`='NULL', `ClientIP`='109.193.63.11', `OrgMember`='-1', `OrgLeader`='-1', `OrgName`='Keine',`Festgeld`='0',`Festgeldpd`='0',`BusSkill`='0',`Paket`='0',`Krankenhaus`='0', WHERE `Name`='Heaven') - 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 'WHERE `Name`='Heaven'' at line 1)
    [11:13:15] OnQueryError() - Called.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen