help with basic mysql
#5

Then do sth like this:

Код:
new string[128];
format(string,128,"SELECT job FROM `players` WHERE `userid` = '%d'",hereID);
mysql_function_query(dbHandle,string, true, "GetData", "i", playerid);

forward GetData(playerid);
public GetData(playerid)
{
    if(!cache_num_rows()) return SendClientMessage(playerid,-1,"Es wurde nichts gefunden!");
    new tmp[11];
    cache_get_row(0, 0, tmp);
    pInfo[playerid][job] = strval(tmp);
    return 1;
}
Reply


Messages In This Thread
help with basic mysql - by Veng3eur - 10.03.2015, 19:27
Re: help with basic mysql - by Veng3eur - 11.03.2015, 14:03
AW: help with basic mysql - by Kaliber - 11.03.2015, 14:04
Re: help with basic mysql - by Veng3eur - 11.03.2015, 14:07
AW: help with basic mysql - by Kaliber - 11.03.2015, 14:15
Re: help with basic mysql - by Misiur - 11.03.2015, 14:41
Re: help with basic mysql - by Veng3eur - 11.03.2015, 14:47

Forum Jump:


Users browsing this thread: 2 Guest(s)