View Full Version : String not inserted into database

15/09/2015, 02:19 PM

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:
0000 and I change it to 0001
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: 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;

The relevant string is the PInfo[playerid][Tikistring], does anyone know how to properly save this string into the field: tikistring?

Thanks in advance

15/09/2015, 02:34 PM
Update: none of my stats are saved in the database, I didn't have this problem before updating to 0.3.7, what's the problem?