07.07.2010, 14:35
Hello guys, I have a problem when I try to load data from a mysql database.
The problem is when I load the Part 2 it puts in PlayerInfo[playerid][pSex] the `Name` from the Part1.
Is there a way to fix this? I don't want to load all the parameters in one string.
Thank you guys!
Код:
//Part 1 format(queryEX,512,"SELECT `Name`,`Money`,`Bank` FROM `players` WHERE `id`='%d'",PlayerInfo[playerid][pSQLID]); mysql_query(queryEX); mysql_store_result(); mysql_fetch_row_format(resultEX,"|"); mysql_free_result(); sscanf(resultEX,"p|sdd", PlayerInfo[playerid][pName], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pBank] //Part2 format(queryEX,512,"SELECT `Sex`,`Origin` FROM `players` WHERE `id`='%d'",PlayerInfo[playerid][pSQLID]); mysql_query(queryEX); mysql_store_result(); mysql_fetch_row_format(resultEX,"|"); mysql_free_result(); sscanf(resultEX,"p|dd", PlayerInfo[playerid][pSex], PlayerInfo[playerid][pOrigin]
Is there a way to fix this? I don't want to load all the parameters in one string.
Thank you guys!