27.09.2017, 14:37
Hello there!
I recently started working with mySQL querys. And I'm facing a problem. I need to fetch a data from my database (player's skin) but I don't know how exactly.
My player skin saves perfectly, and here is the code:
I don't know what should I do to make it work, I tried adding a _tempskin to storage somewhere fetched data and later on I can set the skin but it returns CJ skin.
Thanks!!
I recently started working with mySQL querys. And I'm facing a problem. I need to fetch a data from my database (player's skin) but I don't know how exactly.
My player skin saves perfectly, and here is the code:
Код:
new playerSkin = GetPlayerSkin(playerid); new query[70]; mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `skin` = %d WHERE `id` = %d LIMIT 1", playerSkin, Player[playerid][ID]); mysql_tquery(g_SQL, query);
Код:
new query[70]; new _tempskin; mysql_format(g_SQL, query, sizeof query, "SELECT FROM `players` WHERE `skin` = %d LIMIT 1", _tempskin); mysql_tquery(g_SQL, query); SetPlayerSkin(playerid, _tempskin);