22.04.2011, 22:26
Hi everyone, I'm working on a register system based in MYSQL. I've got the register and load function, but I need the saving function.
I'm trying to use this code, but it doesn't work.
I have to use two differents query's because of the amount of variables. (The lines is too long)
The first part works, (mysql_query(SQL), but the second doesn't work (SQL2).
Anyone know why? Thanks in advice.
(If someone knows a better way of saving variables with MYSQL tell me how please)
Sorry for my English.
I'm trying to use this code, but it doesn't work.
pawn Код:
format(SQL,sizeof(SQL), "UPDATE Users SET Name='%s',Pass='%s',Nivel=%i,Level=%i,[...]WHERE ID = %i", PlayerInfo[playerid][pName],PlayerInfo[playerid][pKey],PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pAdmin],[...],PlayerInfo[playerid][pMYSQLID]);
mysql_query(SQL);
mysql_free_result();
format(SQL2,sizeof(SQL2), "UPDATE Users SET [others variables][...]");
mysql_query(SQL2);
mysql_free_result();
;
The first part works, (mysql_query(SQL), but the second doesn't work (SQL2).
Anyone know why? Thanks in advice.
(If someone knows a better way of saving variables with MYSQL tell me how please)
Sorry for my English.