MYSQL not grabbing the ID
#1

So, I'm working on my registering system.
I want to store the "ID" from the database into the variable pInfo[playerid][ID].
My register system return the following text "New account registered ID: x".
This is what I have to get the ID.
Код:
public OnAccountRegister(playerid)
{
    pInfo[playerid][ID] = cache_get_field_content_int(0, "ID"); 
	printf("New account registered. ID: %d", pInfo[playerid][ID]); 
    return 1;
}
For some reason, it doesn't get the ID. It allways displays 0 as the ID, no matter how many users I have registered.
Reply
#2

bump
Reply
#3

https://sampwiki.blast.hk/wiki/MySQL/R33#cache_insert_id
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)