15.09.2015, 14:19
Hi
I have a little problem inserting a string in a database field.
The string is saved in the var:
And whenever I wish to change the string, and then display it in the server it works. For example, if the string is:
and I change it to
and when I display the new string in the chat it works perfectly fine.
However when I try to save the updated string in my database, for some reason it doesn't change...
Here's the saving code:
The relevant string is the PInfo[playerid][Tikistring], does anyone know how to properly save this string into the field: tikistring?
Thanks in advance
I have a little problem inserting a string in a database field.
The string is saved in the var:
pawn Код:
PInfo[playerid][TikiString]
Код:
0000
Код:
0001
However when I try to save the updated string in my database, for some reason it doesn't change...
Here's the saving code:
pawn Код:
stock SaveData(playerid)
{
new Query[700];// a querry
format(Query, sizeof(Query), "UPDATE users SET admin = %d, pLevel = %d, tikistring = '%q', money = %d, score = %d, skin = %d, color = %d, kills = %d, reputation = %d, deaths = %d, vortexpb = %.2f, houses = %d, raceswon = %d, racesraced = %d, gold = %d, reactions = %d WHERE username = '%s'",
PInfo[playerid][Level], PInfo[playerid][Exp], PInfo[playerid][TikiString], PInfo[playerid][Money], PInfo[playerid][Score],PInfo[playerid][Skin], PInfo[playerid][Color], PInfo[playerid][Kills],PInfo[playerid][Rep],PInfo[playerid][Deaths],PInfo[playerid][VortexPB], PInfo[playerid][Houses],PInfo[playerid][RacesWon], PInfo[playerid][RacesRaced], PInfo[playerid][Gold], PInfo[playerid][Reactions], DB_Escape(PInfo[playerid][Name]));
db_free_result(db_query(Database, Query));
return 1;
}
Thanks in advance