MYSQL not grabbing the ID - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MYSQL not grabbing the ID (
/showthread.php?tid=596897)
MYSQL not grabbing the ID -
danielpalade - 24.12.2015
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.
Re: MYSQL not grabbing the ID -
danielpalade - 24.12.2015
bump
Re: MYSQL not grabbing the ID -
Jefff - 24.12.2015
https://sampwiki.blast.hk/wiki/MySQL/R33#cache_insert_id