[MySQL] Need help, calling all MySQL gurus. WILL +REP :D
#2

I'm not quite sure what you mean by returning a playerid but here is what I think you mean:
pawn Код:
stock ListAllCops()
{
    mysql_query("SELECT name FROM players WHERE faction = 1");
    mysql_store_result();
    new massivestr[2000], name[30];
    while(mysql_retrieve_row())
    {
        mysql_get_field("name", name);
        format(massivestr, sizeof(massivestr), "%s, %s", massivestr, name)
    }
    mysql_free_result();
    return massivestr[1];
}
Usage could be:

pawn Код:
new string[2050];
format(string, sizeof(string), "Cops: %s", ListAllCops());
Reply


Messages In This Thread
nevermind. - by xxxDunecatxxx - 16.04.2012, 07:39
Re: [MySQL] Need help, calling all MySQL gurus. WILL +REP :D - by [HiC]TheKiller - 16.04.2012, 09:51

Forum Jump:


Users browsing this thread: 1 Guest(s)