MySQL Fehler

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 Tag,


    Und zwar bekomme ich diesen Fehler in der MySQL Log.


    SQL
    [15:04:09] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2[15:04:09] [DEBUG] CMySQLHandle::Create - creating new connection..[15:04:09] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called[15:04:09] [DEBUG] CMySQLHandle::Create - connection created (id: 1)[15:04:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:09] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:09] [DEBUG] mysql_errno - connection: 1[15:04:09] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_accounts` (  `ID` int(11) NOT NU", callback: "(null)", format: "(null)"[15:04:09] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_banrange` (  `ID` int(11) NOT NU", callback: "(null)", format: "(null)"[15:04:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:09] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_scheine` (  `ID` int(11) NOT NUL", callback: "(null)", format: "(null)"[15:04:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:09] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:09] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_settings` (  `ID` int(11) NOT NU", callback: "(null)", format: "(null)"[15:04:09] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:09] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:09] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:09] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:09] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO BCL_settings VALUES ();", callback: "(null)", format: "(null)"[15:04:09] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `BCL_settings`", callback: "LoadSettings", format: "(null)"[15:04:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:09] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.629 milliseconds[15:04:09] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:09] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.572 milliseconds[15:04:09] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:09] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.395 milliseconds[15:04:09] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:09] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.432 milliseconds[15:04:09] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:09] [ERROR] CMySQLQuery::Execute[] - (error #1062) Duplicate entry '0' for key 'PRIMARY'[15:04:09] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError[15:04:09] [DEBUG] CMySQLQuery::Execute[LoadSettings] - starting query execution[15:04:09] [DEBUG] CMySQLQuery::Execute[LoadSettings] - query was successfully executed within 0.311 milliseconds[15:04:09] [DEBUG] Calling callback "OnQueryError"..[15:04:09] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[15:04:09] [DEBUG] Calling callback "LoadSettings"..[15:04:09] [DEBUG] cache_get_data - connection: 1[15:04:09] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 1", connection: 1[15:04:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 1", data: "22"[15:04:09] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 2", connection: 1[15:04:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 2", data: "25"[15:04:09] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 3", connection: 1[15:04:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 3", data: "18"[15:04:09] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 4", connection: 1[15:04:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 4", data: "20"[15:04:09] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Staatskasse", connection: 1[15:04:09] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Staatskasse", data: "1250000"[15:04:09] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[15:04:13] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `BCL_banrange` WHERE `Name` = 'Havoc.' AND `Gesper", callback: "MySQL_Banrange", format: "i"[15:04:13] [DEBUG] CMySQLQuery::Execute[MySQL_Banrange] - starting query execution[15:04:13] [DEBUG] CMySQLQuery::Execute[MySQL_Banrange] - query was successfully executed within 0.376 milliseconds[15:04:13] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[15:04:13] [DEBUG] Calling callback "MySQL_Banrange"..[15:04:13] [DEBUG] cache_get_data - connection: 1[15:04:13] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[15:04:20] [DEBUG] mysql_escape_string - source: "Havoc.", connection: 1, max_len: 24[15:04:20] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM BCL_accounts WHERE Name = 'Havoc.'", callback: "UserCheck", format: "i"[15:04:20] [DEBUG] CMySQLQuery::Execute[UserCheck] - starting query execution[15:04:20] [DEBUG] CMySQLQuery::Execute[UserCheck] - query was successfully executed within 0.368 milliseconds[15:04:20] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[15:04:20] [DEBUG] Calling callback "UserCheck"..[15:04:20] [DEBUG] cache_get_data - connection: 1[15:04:20] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[15:04:23] [DEBUG] mysql_escape_string - source: "Havoc.", connection: 1, max_len: 24[15:04:23] [DEBUG] mysql_escape_string - source: "123456", connection: 1, max_len: 128[15:04:23] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM BCL_accounts WHERE Name = 'Havoc.' AND Passwort = ", callback: "OnPasswordResponse", format: "i"[15:04:23] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - starting query execution[15:04:23] [DEBUG] CMySQLQuery::Execute[OnPasswordResponse] - query was successfully executed within 0.486 milliseconds[15:04:23] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[15:04:23] [DEBUG] Calling callback "OnPasswordResponse"..[15:04:23] [DEBUG] cache_get_data - connection: 1[15:04:23] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE BCL_accounts SET Eingeloggt = '1' WHERE Name = 'Havoc.'", callback: "(null)", format: "(null)"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Admin", connection: 1[15:04:23] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Admin", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Tutorial", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Tutorial", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Level", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Level", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Payday", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Payday", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Respekt", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Respekt", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "MaxRespekt", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "MaxRespekt", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Geld", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Geld", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Bank", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Bank", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Festgeld", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Festgeld", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Lohn", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Lohn", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Skin", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Skin", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Spawnchange", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Spawnchange", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Fraktion", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Fraktion", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "FrakRank", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "FrakRank", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "FrakSkin", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "FrakSkin", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Verheiratet", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Verheiratet", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Job", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Job", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Geschlecht", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Geschlecht", data: "0"[15:04:23] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `BCL_scheine` WHERE `Name` = 'Havoc.'", callback: "LoadPlayerScheine", format: "i"[15:04:23] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[15:04:23] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 92.522 milliseconds[15:04:23] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:23] [DEBUG] CMySQLQuery::Execute[LoadPlayerScheine] - starting query execution[15:04:23] [DEBUG] CMySQLQuery::Execute[LoadPlayerScheine] - query was successfully executed within 0.300 milliseconds[15:04:23] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[15:04:23] [DEBUG] Calling callback "LoadPlayerScheine"..[15:04:23] [DEBUG] cache_get_data - connection: 1[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Autoschein", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Autoschein", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "AutoscheinPunkte", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "AutoscheinPunkte", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Flugschein", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Flugschein", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Waffenschein", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Waffenschein", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Fischschein", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Fischschein", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Zollschein", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Zollschein", data: "0"[15:04:23] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Personalausweis", connection: 1[15:04:23] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Personalausweis", data: "0"[15:04:23] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called[15:04:35] [DEBUG] mysql_format - connection: 1, len: 80, format: "UPDATE BCL_accounts SET `LastLogin` = NOW() WHERE Name = '%e'"[15:04:35] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE BCL_accounts SET `LastLogin` = NOW() WHERE Name = 'Havoc.", callback: "(null)", format: "(null)"[15:04:35] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `BCL_accounts` SET `InternetProtocol` = '255.255.255.255'", callback: "(null)", format: "(null)"[15:04:35] [DEBUG] mysql_tquery - connection: 1, query: "`Bank`='0', `Festgeld`='0', `Lohn`='0', `Skin`='20', `Spawnchang", callback: "(null)", format: "(null)"[15:04:35] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:35] [DEBUG] mysql_tquery - connection: 1, query: "`Job`='0', `Geschlecht`='2', WHERE Name = 'Havoc.'", callback: "(null)", format: "(null)"[15:04:35] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `BCL_scheine` SET  `Autoschein` = '0', `AutoscheinPunkte`", callback: "(null)", format: "(null)"[15:04:35] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 92.441 milliseconds[15:04:35] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:35] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:35] [ERROR] CMySQLQuery::Execute[] - (error #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[15:04:35] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError[15:04:35] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:35] [DEBUG] Calling callback "OnQueryError"..[15:04:35] [ERROR] CMySQLQuery::Execute[] - (error #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 '`Bank`='0', `Festgeld`='0', `Lohn`='0', `Skin`='20', `Spawnchange`='0', `Fraktio' at line 1[15:04:35] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError[15:04:35] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:35] [DEBUG] Calling callback "OnQueryError"..[15:04:35] [ERROR] CMySQLQuery::Execute[] - (error #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 '`Job`='0', `Geschlecht`='2', WHERE Name = 'Havoc.'' at line 1[15:04:35] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError[15:04:35] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:35] [DEBUG] Calling callback "OnQueryError"..[15:04:35] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 34.265 milliseconds[15:04:35] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:53] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2[15:04:53] [DEBUG] CMySQLHandle::Create - creating new connection..[15:04:53] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called[15:04:53] [DEBUG] CMySQLHandle::Create - connection created (id: 1)[15:04:53] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:53] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:53] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:53] [DEBUG] mysql_errno - connection: 1[15:04:53] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_accounts` (  `ID` int(11) NOT NU", callback: "(null)", format: "(null)"[15:04:53] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_banrange` (  `ID` int(11) NOT NU", callback: "(null)", format: "(null)"[15:04:53] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:53] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:53] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_scheine` (  `ID` int(11) NOT NUL", callback: "(null)", format: "(null)"[15:04:53] [DEBUG] CMySQLConnection::Connect - establishing connection to database...[15:04:53] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:53] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:53] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:53] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:53] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_settings` (  `ID` int(11) NOT NU", callback: "(null)", format: "(null)"[15:04:53] [DEBUG] CMySQLConnection::Connect - connection was successful[15:04:53] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO BCL_settings VALUES ();", callback: "(null)", format: "(null)"[15:04:53] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled[15:04:53] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:53] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `BCL_settings`", callback: "LoadSettings", format: "(null)"[15:04:53] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 308.814 milliseconds[15:04:53] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:53] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:54] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 212.398 milliseconds[15:04:54] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:54] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:54] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 482.105 milliseconds[15:04:54] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:54] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:54] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 302.289 milliseconds[15:04:54] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:54] [DEBUG] CMySQLQuery::Execute[] - starting query execution[15:04:54] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 21.606 milliseconds[15:04:54] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving[15:04:54] [DEBUG] CMySQLQuery::Execute[LoadSettings] - starting query execution[15:04:54] [DEBUG] CMySQLQuery::Execute[LoadSettings] - query was successfully executed within 0.344 milliseconds[15:04:54] [DEBUG] CMySQLResult::CMySQLResult() - constructor called[15:04:54] [DEBUG] Calling callback "LoadSettings"..[15:04:54] [DEBUG] cache_get_data - connection: 1[15:04:54] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 1", connection: 1[15:04:54] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 1", data: "22"[15:04:54] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 2", connection: 1[15:04:54] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 2", data: "25"[15:04:54] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 3", connection: 1[15:04:54] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 3", data: "18"[15:04:54] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 4", connection: 1[15:04:54] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 4", data: "20"[15:04:54] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Staatskasse", connection: 1[15:04:54] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Staatskasse", data: "1250000"[15:04:54] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called


    Kann mir einer helfen ? Jeffry:

  • stock SpielerSpeichern(playerid)
    {
    new mainQuery[2048], secondQuery[1024];
    if(SpielerInfo[playerid][pEingeloggt] == 0)return 1;
    SpielerInfo[playerid][pEingeloggt] = 0;

    format(secondQuery, sizeof(secondQuery), "UPDATE `"SERVER_TAG"_accounts` SET `InternetProtocol` = '%s', `Eingeloggt`='%d', `Admin`='%d', `Tutorial`='%d', `Level`='%d', `Payday`='%d', `Respekt`='%d', `MaxRespekt`='%d', `Geld`='%d',",
    SpielerIP(playerid), SpielerInfo[playerid][pEingeloggt], SpielerInfo[playerid][pAdmin], SpielerInfo[playerid][pTutorial],SpielerInfo[playerid][pLevel],SpielerInfo[playerid][pPayday],
    SpielerInfo[playerid][pRespekt],SpielerInfo[playerid][pMaxRespekt],SpielerInfo[playerid][pGeld]);
    strcat(mainQuery, secondQuery);
    mysql_function_query(Handle, mainQuery, false, "", "");
    strdel(mainQuery, 0, sizeof(mainQuery));
    strdel(secondQuery, 0, sizeof(secondQuery));


    format(secondQuery, sizeof(secondQuery), "`Bank`='%d', `Festgeld`='%d', `Lohn`='%d', `Skin`='%d', `Spawnchange`='%d', `Fraktion`='%d', `FrakRank`='%d', `FrakSkin`='%d', `Verheiratet`='%d',",
    SpielerInfo[playerid][pBank],SpielerInfo[playerid][pFestgeld],SpielerInfo[playerid][pLohn],SpielerInfo[playerid][pSkin],SpielerInfo[playerid][pSpawnchange],SpielerInfo[playerid][pFraktion],
    SpielerInfo[playerid][pFrakRank],SpielerInfo[playerid][pFrakSkin],SpielerInfo[playerid][pVerheiratet]);
    strcat(mainQuery, secondQuery);
    mysql_function_query(Handle, mainQuery, false, "", "");
    strdel(mainQuery, 0, sizeof(mainQuery));
    strdel(secondQuery, 0, sizeof(secondQuery));

    format(secondQuery, sizeof(secondQuery), "`Job`='%d', `Geschlecht`='%d', WHERE Name = '%s'",
    SpielerInfo[playerid][pJob],SpielerInfo[playerid][pGeschlecht],Spielername(playerid));
    strcat(mainQuery, secondQuery);
    mysql_function_query(Handle, mainQuery, false, "", "");
    strdel(mainQuery, 0, sizeof(mainQuery));
    strdel(secondQuery, 0, sizeof(secondQuery));


    format(secondQuery, sizeof(secondQuery), "UPDATE `"SERVER_TAG"_scheine` SET `Autoschein` = '%d', `AutoscheinPunkte` = '%d', `Flugschein` = '%d', `Waffenschein` = '%d', `Fischschein` = '%d', `Zollschein` = '%d', `Personalausweis` = '%d' WHERE `Name` = '%s'",
    SpielerInfo[playerid][pAutoschein],SpielerInfo[playerid][pAutoscheinPunkte],SpielerInfo[playerid][pFlugschein],SpielerInfo[playerid][pWaffenschein],SpielerInfo[playerid][pFischschein],SpielerInfo[playerid][pZollschein],SpielerInfo[playerid][pPersonalausweis],Spielername(playerid));
    strcat(mainQuery, secondQuery);
    mysql_function_query(Handle, mainQuery, false, "", "");
    strdel(mainQuery, 0, sizeof(mainQuery));
    strdel(secondQuery, 0, sizeof(secondQuery));

    return 1;
    }

  • Versuche es so:
    stock SpielerSpeichern(playerid)
    {
    new mainQuery[2048];
    if(SpielerInfo[playerid][pEingeloggt] == 0)return 1;
    SpielerInfo[playerid][pEingeloggt] = 0;


    //Query 1
    format(mainQuery, sizeof(mainQuery), "UPDATE `"SERVER_TAG"_accounts` SET `InternetProtocol` = '%s', `Eingeloggt`='%d', `Admin`='%d', `Tutorial`='%d', `Level`='%d', `Payday`='%d', `Respekt`='%d', `MaxRespekt`='%d', `Geld`='%d',",
    SpielerIP(playerid), SpielerInfo[playerid][pEingeloggt], SpielerInfo[playerid][pAdmin], SpielerInfo[playerid][pTutorial],SpielerInfo[playerid][pLevel],SpielerInfo[playerid][pPayday],
    SpielerInfo[playerid][pRespekt],SpielerInfo[playerid][pMaxRespekt],SpielerInfo[playerid][pGeld]);

    format(mainQuery, sizeof(mainQuery), "%s`Bank`='%d', `Festgeld`='%d', `Lohn`='%d', `Skin`='%d', `Spawnchange`='%d', `Fraktion`='%d', `FrakRank`='%d', `FrakSkin`='%d', `Verheiratet`='%d',",
    mainQuery,SpielerInfo[playerid][pBank],SpielerInfo[playerid][pFestgeld],SpielerInfo[playerid][pLohn],SpielerInfo[playerid][pSkin],SpielerInfo[playerid][pSpawnchange],SpielerInfo[playerid][pFraktion],
    SpielerInfo[playerid][pFrakRank],SpielerInfo[playerid][pFrakSkin],SpielerInfo[playerid][pVerheiratet]);

    format(mainQuery, sizeof(mainQuery), "%s`Job`='%d', `Geschlecht`='%d' WHERE Name = '%s'",
    mainQuery,SpielerInfo[playerid][pJob],SpielerInfo[playerid][pGeschlecht],Spielername(playerid));
    mysql_function_query(Handle, mainQuery, false, "", "");

    //Query 2
    format(mainQuery, sizeof(mainQuery), "UPDATE `"SERVER_TAG"_scheine` SET `Autoschein` = '%d', `AutoscheinPunkte` = '%d', `Flugschein` = '%d', `Waffenschein` = '%d', `Fischschein` = '%d', `Zollschein` = '%d', `Personalausweis` = '%d' WHERE `Name` = '%s'",
    SpielerInfo[playerid][pAutoschein],SpielerInfo[playerid][pAutoscheinPunkte],SpielerInfo[playerid][pFlugschein],SpielerInfo[playerid][pWaffenschein],SpielerInfo[playerid][pFischschein],SpielerInfo[playerid][pZollschein],SpielerInfo[playerid][pPersonalausweis],Spielername(playerid));

    mysql_function_query(Handle, mainQuery, false, "", "");
    return 1;
    }


    Falls es nicht geht, was sagt der Log?

    3HZXdYd.png

    Einmal editiert, zuletzt von Jeffry ()

  • Jeffry:


    Jetzt will er keine Spieler speichern mehr.



    MySQL Log.


    Spoiler anzeigen
    [16:26:14] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
    [16:26:14] [DEBUG] CMySQLHandle::Create - creating new connection..
    [16:26:14] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    [16:26:14] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
    [16:26:14] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [16:26:14] [DEBUG] CMySQLConnection::Connect - connection was successful
    [16:26:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [16:26:14] [DEBUG] mysql_errno - connection: 1
    [16:26:14] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_accounts` ( `ID` int(11) NOT NU", callback: "(null)", format: "(null)"
    [16:26:14] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_banrange` ( `ID` int(11) NOT NU", callback: "(null)", format: "(null)"
    [16:26:14] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_scheine` ( `ID` int(11) NOT NUL", callback: "(null)", format: "(null)"
    [16:26:14] [DEBUG] mysql_tquery - connection: 1, query: "CREATE TABLE IF NOT EXISTS `BCL_settings` ( `ID` int(11) NOT NU", callback: "(null)", format: "(null)"
    [16:26:14] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [16:26:14] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO BCL_settings VALUES ();", callback: "(null)", format: "(null)"
    [16:26:14] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [16:26:14] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [16:26:14] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `BCL_settings`", callback: "LoadSettings", format: "(null)"
    [16:26:14] [DEBUG] CMySQLConnection::Connect - connection was successful
    [16:26:14] [DEBUG] CMySQLConnection::Connect - connection was successful
    [16:26:14] [DEBUG] CMySQLConnection::Connect - connection was successful
    [16:26:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [16:26:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [16:26:14] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:26:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 401.16 milliseconds
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 159.976 milliseconds
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 167.898 milliseconds
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 232.236 milliseconds
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 35.546 milliseconds
    [16:26:15] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:26:15] [DEBUG] CMySQLQuery::Execute[LoadSettings] - starting query execution
    [16:26:15] [DEBUG] CMySQLQuery::Execute[LoadSettings] - query was successfully executed within 0.363 milliseconds
    [16:26:15] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [16:26:15] [DEBUG] Calling callback "LoadSettings"..
    [16:26:15] [DEBUG] cache_get_data - connection: 1
    [16:26:15] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 1", connection: 1
    [16:26:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 1", data: "22"
    [16:26:15] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 2", connection: 1
    [16:26:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 2", data: "25"
    [16:26:15] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 3", connection: 1
    [16:26:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 3", data: "18"
    [16:26:15] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Steuerklasse 4", connection: 1
    [16:26:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Steuerklasse 4", data: "20"
    [16:26:15] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Staatskasse", connection: 1
    [16:26:15] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Staatskasse", data: "1250000"
    [16:26:15] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [16:26:51] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `BCL_banrange` WHERE `Name` = 'Havoc.' AND `Gesper", callback: "MySQL_Banrange", format: "i"
    [16:26:51] [DEBUG] CMySQLQuery::Execute[MySQL_Banrange] - starting query execution
    [16:26:51] [DEBUG] CMySQLQuery::Execute[MySQL_Banrange] - query was successfully executed within 0.357 milliseconds
    [16:26:51] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [16:26:51] [DEBUG] Calling callback "MySQL_Banrange"..
    [16:26:51] [DEBUG] cache_get_data - connection: 1
    [16:26:51] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [16:26:57] [DEBUG] mysql_escape_string - source: "Havoc.", connection: 1, max_len: 24
    [16:26:57] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM BCL_accounts WHERE Name = 'Havoc.'", callback: "UserCheck", format: "i"
    [16:26:57] [DEBUG] CMySQLQuery::Execute[UserCheck] - starting query execution
    [16:26:57] [DEBUG] CMySQLQuery::Execute[UserCheck] - query was successfully executed within 0.412 milliseconds
    [16:26:57] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [16:26:57] [DEBUG] Calling callback "UserCheck"..
    [16:26:57] [DEBUG] cache_get_data - connection: 1
    [16:26:57] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [16:27:00] [DEBUG] mysql_escape_string - source: "Havoc.", connection: 1, max_len: 24
    [16:27:00] [DEBUG] mysql_escape_string - source: "123456", connection: 1, max_len: 128
    [16:27:00] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO BCL_accounts (Name, Passwort, Eingeloggt) VALUES ('H", callback: "(null)", format: "(null)"
    [16:27:00] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO BCL_scheine (Name) VALUES ('Havoc.')", callback: "(null)", format: "(null)"
    [16:27:00] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:27:00] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 105.882 milliseconds
    [16:27:00] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:27:00] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:27:00] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 27.531 milliseconds
    [16:27:00] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [16:27:09] [DEBUG] mysql_format - connection: 1, len: 80, format: "UPDATE BCL_accounts SET `LastLogin` = NOW() WHERE Name = '%e'"
    [16:27:09] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE BCL_accounts SET `LastLogin` = NOW() WHERE Name = 'Havoc.", callback: "(null)", format: "(null)"
    [16:27:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [16:27:09] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 60.341 milliseconds
    [16:27:09] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving


    //e


    Jeffry:


    Was sagt der Error aus ?


    SQL
    [16:44:55] [ERROR] CMySQLQuery::Execute[] - (error #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 = 'Havoc.'' at line 1

    Einmal editiert, zuletzt von Havoc ()

  • Oh, sorry. Habe ich übersehen, habe es oben bereits ausgebessert.
    format(mainQuery, sizeof(mainQuery), "%s`Job`='%d', `Geschlecht`='%d', WHERE Name = '%s'",
    zu:
    format(mainQuery, sizeof(mainQuery), "%s`Job`='%d', `Geschlecht`='%d' WHERE Name = '%s'",


    Da war ein Komma wo es nicht hingehört.