No logro obtener datos con cache_get_field_content.
#3

Код:
SQL_IntentoLogin(playerid, const password[])
{
    new
        query[300],
        string[256],
        buffer[129],
        content[129];
    mysql_format(conn,query,sizeof(query),"SELECT `salt` FROM `accounts` WHERE `Username` = '%e' LIMIT 1",PlayerInfo[playerid][pUsername]);
    new Cache:result = mysql_query(conn, query);
    if(cache_num_rows())
    {
        cache_get_field_content(0, "salt", content, conn);
    }
    cache_delete(result);
    strcat(string,password);
    strcat(string,PlayerInfo[playerid][Salt]);
    WP_Hash(buffer, sizeof(buffer), string);
    mysql_format(conn, query, sizeof(query), "SELECT `ID` FROM `accounts` WHERE `Username` = '%e' AND `Password` = '%s' LIMIT 1", PlayerInfo[playerid][pUsername],buffer);
    mysql_tquery(conn, query, "OnQueryFinished", "dd", playerid, THREAD_LOGIN);
}
y borra el case 'THREAD_SALT' de OnQueryFinished.

Aunque, no entiendo muy bien como quieres hacer ese login... haces como 50 consultas xD
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)