19.02.2014, 09:01
Hello,
I want to get the variable from the field `id` in my MySQL database, this is used to give the players an own ID forever.
I need to get that ID from the database, but I don't know how
.
My pawncode:
Screen of my table:

Help me pleas!
I want to get the variable from the field `id` in my MySQL database, this is used to give the players an own ID forever.
I need to get that ID from the database, but I don't know how

My pawncode:
Код:
public GetPlayersRealId(playerid) { new query[600], usersname[MAX_PLAYER_NAME+1]; GetPlayerName(playerid, usersname, sizeof(usersname)); format(query, sizeof(query), "SELECT * FROM playerdata WHERE user = '$s' LIMIT 1 ORDER BY id DESC", usersname); mysql_query(query); if(mysql_num_rows() == 1) { mysql_store_result(); new resultline[200]; if(mysql_fetch_row_format(resultline)) { //Should return the ID. } mysql_free_result(); } else { return 0; } return 1; }

Help me pleas!