03.05.2015, 02:51
Look at the commentary below, please.
Do it like this:
And remove the mysql_store_result() line after the INSERT INTO query, it won't be needed.
Код:
mysql_query(query); mysql_store_result(); format(query, sizeof(query),"SELECT `id` FROM `playerinfo` WHERE `user`='%s' LIMIT 1",escpname); mysql_fetch_int("id",gPlayerInfo[playerid][pDBID]); //This expression wants to fetch the id of a query which wasn't sent at this moment, because the query will be sent not until the next line. mysql_query(query); mysql_store_result();
Код:
mysql_query(query); mysql_store_result(); format(query, sizeof(query),"SELECT `id` FROM `playerinfo` WHERE `user`='%s' LIMIT 1",escpname); mysql_query(query); mysql_store_result(); mysql_fetch_int("id",gPlayerInfo[playerid][pDBID]); mysql_free_result();