MySQL Passwort 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
  • Hey leute, ich habe gerade ein MD5 Hash gescriptet und ehm


    'Voher ging alles aber nun wenn ich mich einloggen möchte ist anscheinend jedes Passwort "falsch" was ich eingebe ??


    mysql_escape_string(inputtext, Passwort, handle);
    format(query, sizeof(query), "SELECT * FROM accounts WHERE Username='%s' AND Password=MD5('%s')",getPlayerName(playerid), Passwort);
    mysql_function_query(handle, query, true, "CheckPasswort", "i", playerid);

  • BlueG r7?


    OnGameModeInit: mysql_debug(1);


    //EDIT:
    Mach mal so:

    mysql_escape_string(inputtext,Passwort,handle);
    format(query, sizeof(query), "SELECT * FROM `accounts` WHERE `Username` ='%s' AND `Password`='%s' LIMIT 1", getPlayerName(playerid), MD5_Hash(Passwort));
    mysql_function_query(mysqlcon,query, true, "CheckPasswort", "i",playerid);

    Na das ist ja Unglaublich! Was sucht denn dein Bein unter meinem Reifen du Sack?


    Einmal editiert, zuletzt von HEiTZER ()

  • SELECT * FROM `accounts` WHERE `Username` ='%s' AND `Password`='%s' LIMIT 1


    Nach deinem CODE geht es immer noch nicht


    Das steht in der debug


    [12:07:26] [DEBUG] mysql_tquery - connection: 1, query: "SELECT id FROM accounts WHERE Username='Mega_Joe'", callback: "PlayerCheck", format: "i"
    [12:07:26] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [12:07:26] [DEBUG] mysql_tquery - scheduling query "SELECT id FROM accounts WHERE Username='Mega_Joe'"..
    [12:07:26] [DEBUG] CMySQLQuery::Execute[PlayerCheck(i)] - starting query execution
    [12:07:26] [DEBUG] CMySQLQuery::Execute[PlayerCheck(i)] - query was successful
    [12:07:26] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [12:07:26] [DEBUG] CMySQLQuery::Execute[PlayerCheck(i)] - data being passed to ProcessCallbacks()
    [12:07:26] [DEBUG] Calling callback "PlayerCheck"..
    [12:07:26] [DEBUG] cache_get_data - connection: 1
    [12:07:26] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [12:07:26] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
    [12:07:32] [DEBUG] mysql_escape_string - source: "12345678", connection: 1, max_len: 35
    [12:07:32] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `accounts` WHERE `Username` ='Mega_Joe' AND `Passw", callback: "CheckPasswort", format: "i"
    [12:07:32] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [12:07:32] [DEBUG] mysql_tquery - scheduling query "SELECT * FROM `accounts` WHERE `Username` ='Mega_Joe' AND `Password`='25D55AD283AA400AF464C76D713C07AD' LIMIT 1"..
    [12:07:32] [DEBUG] CMySQLQuery::Execute[CheckPasswort(i)] - starting query execution
    [12:07:32] [DEBUG] CMySQLQuery::Execute[CheckPasswort(i)] - query was successful
    [12:07:32] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [12:07:32] [DEBUG] CMySQLQuery::Execute[CheckPasswort(i)] - data being passed to ProcessCallbacks()
    [12:07:32] [DEBUG] Calling callback "CheckPasswort"..
    [12:07:32] [DEBUG] cache_get_data - connection: 1
    [12:07:32] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [12:07:32] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
    [12:07:33] [DEBUG] mysql_escape_string - source: "1", connection: 1, max_len: 35
    [12:07:33] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `accounts` WHERE `Username` ='Mega_Joe' AND `Passw", callback: "CheckPasswort", format: "i"
    [12:07:33] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
    [12:07:33] [DEBUG] mysql_tquery - scheduling query "SELECT * FROM `accounts` WHERE `Username` ='Mega_Joe' AND `Password`='C4CA4238A0B923820DCC509A6F75849B' LIMIT 1"..
    [12:07:33] [DEBUG] CMySQLQuery::Execute[CheckPasswort(i)] - starting query execution
    [12:07:33] [DEBUG] CMySQLQuery::Execute[CheckPasswort(i)] - query was successful
    [12:07:33] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [12:07:33] [DEBUG] CMySQLQuery::Execute[CheckPasswort(i)] - data being passed to ProcessCallbacks()
    [12:07:33] [DEBUG] Calling callback "CheckPasswort"..
    [12:07:33] [DEBUG] cache_get_data - connection: 1
    [12:07:33] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [12:07:33] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called


    mysql_escape_string(inputtext, Passwort, handle);
    format(query, sizeof(query), "SELECT * FROM `accounts` WHERE `Username` ='%s' AND `Password`='%s' LIMIT 1",getPlayerName(playerid), MD5_Hash(Passwort));
    mysql_function_query(handle, query, true, "CheckPasswort", "i", playerid);


    Ja das von Blueg r34 :)