19.03.2011, 14:18
Hey guys,
i have a little problem with my sql-system.
It works pretty fine, but my user-name wont be save.
That is my big problem.
Here is some code:
The query looks alright. My name is right in the "printf" output.
The database structure should be also alright, because, the key will be saved rightly.
i have a little problem with my sql-system.
It works pretty fine, but my user-name wont be save.
That is my big problem.
Here is some code:
pawn Код:
//Register
new pName[MAX_PLAYER_NAME],query[300];
GetPlayerName(playerid, pName, sizeof(pName));
cvar[playerid] = 1;
format(query, sizeof(query), "INSERT INTO samp_accounts (pKey,pName,cvar) VALUES ('%s','%s',%d)", password, pName,cvar[playerid]);
printf("%s",query);
mysql_query(query);
mysql_free_result();
The database structure should be also alright, because, the key will be saved rightly.