06.03.2013, 18:00
In debug log i have no errors but still the information is not stored in my DB.
pawn Код:
stock PlayerRegister(playerid, password[])
{
new query[240];
format(query,sizeof(query),"INSERT INTO `users` (name, pass) VALUES ('%s', '%s')",
returnName(playerid),
password
);
mysql_function_query(g_Handle,query,false,"OnPlayerRegister","i",playerid,password);
}
stock OnPlayerRegister(playerid,password[])
{
PlayerInfo[playerid][pID] = mysql_insert_id();
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Welcome, %s\nYou can now login:",loginname);
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
}
pawn Код:
[20:59:05] Passing query INSERT INTO `users` (name, pass) VALUES ('jaw', 'test') | i
[20:59:05] ProcessQueryThread(OnPlayerRegister) - Query was successful. (INSERT INTO `users` (name, pass) VALUES ('jaw', 'test'))
[20:59:05] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()