Phone
#4

replace field/column names and it should work
pawn Код:
stock HasPhone(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new Query[256],EscapedName[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],hasphone;
        GetPlayerName(playerid,pName,sizeof(pName));
        mysql_real_escape_string(pName, EscapedName);
        format(Query, sizeof(Query), "SELECT `Phone` FROM `players` WHERE `Name` = '%s'", EscapedName);
        mysql_query(Query);
        mysql_store_result();
        hasphone = mysql_fetch_int();
        mysql_free_result();
        return hasphone;
    }
    else print("[MySQL] HasPhone() was called, to non-connected ID.");
    return 0;
}
Reply


Messages In This Thread
Phone - by Rokzlive - 30.12.2010, 23:53
Re: Phone - by Rokzlive - 31.12.2010, 00:05
Re: Phone - by _rAped - 31.12.2010, 00:19
Re: Phone - by veyron - 31.12.2010, 00:45

Forum Jump:


Users browsing this thread: 1 Guest(s)