How to get value from MySQL database? - 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: How to get value from MySQL database? (
/showthread.php?tid=589540)
How to get value from MySQL database? -
MasonSFW - 20.09.2015
This code, I tried to get integer value from db but its not
Re: How to get value from MySQL database? -
BroZeus - 20.09.2015
Thats incorrect usage of printf, use it like this
PHP код:
printf("%d", PlayerInfo[playerid][pAmmo1]);
And instead of giving pic of code please paste the code.
And use cache_get_field_content_int for pSkyRank if its integer type.
Re: How to get value from MySQL database? -
MasonSFW - 20.09.2015
pSpyRank is string (text)
Re: How to get value from MySQL database? -
X337 - 20.09.2015
Third parameter of cache_get_row must be a variable.
cache_get_row(row, field_idx, destination[], connectionHandle = 1, max_len = sizeof(destination))
Take a look at this :
https://sampwiki.blast.hk/wiki/MySQL/R33#cache_get_row