SQLite results question
#3

Why a loop, Jefff? It can be done with an easier way though.

pawn Код:
CMD:aka(playerid,params[])
{
    new ID,DBResult:Result,Query[250];
    if(sscanf(params,"u",ID)) return SendClientMessage(playerid,-1,"USAGE: /aka [playerid]");
    if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,-1,"ERROR: Player not connected.");
    format(Query,sizeof(Query),"SELECT * FROM `Accounts` WHERE `IP` = '%s'",IP[ID]);
    Result = db_query(DB,Query);
    if(db_num_rows(Result) == 1)
    {
        db_get_field_assoc(Result,"Field_Name_Here",Query,/* LENGHT/VALUE_OF_FIELD_HERE */);
    }
    db_free_result(Result);
    return 1;
}
Reply


Messages In This Thread
SQLite results question - by xXShadowXx - 17.03.2013, 21:04
Re: SQLite results question - by Jefff - 17.03.2013, 21:25
Re: SQLite results question - by Konstantinos - 17.03.2013, 21:32
Re: SQLite results question - by xXShadowXx - 17.03.2013, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)