Question about a mysql query
#1

Just started using gstylezzzz's plugin. Why doesn't this code work, guys? All variables have been defined, don't worry.

pawn Код:
format(sql, sizeof(sql), "SELECT * FROM players WHERE Name = '%s'", playername2);
    mysql_query(sql);
    mysql_store_result();
    while(mysql_fetch_row(row))
    {
    split(row, fields, '|');
    PlayerInfo[playerid][pLevel] = strval(fields[3]);
    PlayerInfo[playerid][pAdmin] = strval(fields[4]);
    PlayerInfo[playerid][pDonateRank] = strval(fields[5]);
        PlayerInfo[playerid][pConnectTime] = strval(fields[6]);
        PlayerInfo[playerid][pReg] = strval(fields[7]);
        PlayerInfo[playerid][pSex] = strval(fields[8]);
    }
After this code, it's supposed to obviously log them into the server, send them a message, etc. But it's as if this code is returning 1. The mysql log shows everything to be successful, the query, storing and fetching.
Reply
#2

pawn Код:
while(mysql_fetch_row_format(row,"|"))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)