MySQL - What are rows and fields?
#3

The saving part only saves the first set. So, for example:

Код:
new query[518];
mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Admin`=%d, `Money`=%d, `posX`=%f, `posY`=%f, `posZ`=%f WHERE `ID`=%d", PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pMoney], PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ], PlayerInfo[playerid][ID]);
mysql_tquery(mysql, query, "", "");

mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Gender`=%d, `Level`=%d, `Entered`=%d, `Minutes`=%d, `TMinutes`=%d, 'Hours'=%d, 'Age'=%d, 'Bank'=%d, 'Model'=%d, 'Model1'=%d WHERE `ID`=%d",
PlayerInfo[playerid][pGender], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pEntered], PlayeInfo[playerid][pMinutes], PlayerInfo[playerid][pTMinutes], PlayerInfo[playerid][pHours], PlayerInfo[playerid][pAge], PlayerInfo[playerid][pBank], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pModel1], PlayerInfo[playerid][ID]);
mysql_tquery(mysql, query, "", "");
These two are at the top of the stock that saves all my variables when the player logs out. It only saves the first set, so like the Admin, posX, PosY ect... is saved, but the Gender, Hours, Level is not.

I'm having a problem with the Gender especially. When they select their gender, I do:

Код:
PlayerInfo[playerid][pGender] = 1; //male
And when they log out the stock above is called so that it saves it but when I check the database it's not saved.
Reply


Messages In This Thread
MySQL - What are rows and fields? - by Ciarannn - 28.04.2015, 19:46
Re: MySQL - What are rows and fields? - by Konstantinos - 28.04.2015, 19:53
Re: MySQL - What are rows and fields? - by Ciarannn - 28.04.2015, 20:01
Re: MySQL - What are rows and fields? - by Konstantinos - 28.04.2015, 20:04
Re: MySQL - What are rows and fields? - by Ciarannn - 28.04.2015, 20:06
Re: MySQL - What are rows and fields? - by Konstantinos - 28.04.2015, 20:09
Re: MySQL - What are rows and fields? - by Ciarannn - 28.04.2015, 20:30
Re: MySQL - What are rows and fields? - by Konstantinos - 28.04.2015, 20:35
Re: MySQL - What are rows and fields? - by Ciarannn - 28.04.2015, 20:37
Re: MySQL - What are rows and fields? - by Konstantinos - 28.04.2015, 20:40

Forum Jump:


Users browsing this thread: 1 Guest(s)