Mysql Non_Exist account loads data?
#1

Hi all,

I have a problem with my account exist.
When this is getting called and someone didnt have an account(player is not in mysqldatabase) a random clandata will be loaded.
So sometimes when i player is on the server he is loading as player in a clan but he/she is not in any clan.
pawn Код:
ExistAccount(playerid);//onplayerconnect

stock ExistAccount(playerid)
{
    new query[128];
    format(query, sizeof(query), "SELECT * FROM `"#MYSQL_ACCOUNT_TABLE5"` WHERE `PlayerName` = '%s'", GetPlayeridName(playerid));
    if(mysql_ping(gSQL))
    {
        mysql_query(query, _THREAD_ACCOUNT_EXIST2, playerid, gSQL);
    }
}

case _THREAD_ACCOUNT_EXIST ://Query
        {
            mysql_store_result();
            if(mysql_num_rows(gSQL) > 0)
            {
                LoadPlayer3(extraid);//loading the clan data if the player account exist but its loading it also for players who not is in a clan(Player dont exist in DB)
            }
            mysql_free_result();
        }
How to fix this?

Admigo
Reply


Messages In This Thread
Mysql Non_Exist account loads data? - by Admigo - 01.08.2013, 19:50
Re: Mysql Non_Exist account loads data? - by Admigo - 03.08.2013, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)