06.02.2013, 20:05
I've looked all over the place to see how I can do this, most of the time the answer seems to be strcat but I've tried that and couldn't get it to work so I tried this.
When I compile I don't get any errors and the first query saves everything correctly but it seems like the second query gets completely ignored (Interior & VWorld), so I came here to ask if it is even possible to make multiple queries like this.
pawn Код:
CheckMySQL();
new string[500];
new string2[500];
format(string, sizeof(string), "UPDATE Users\n SET Password='%s',Admin='%d',Money='%d',Skin='%d',Armor='%f',Health='%f',Xpos='%f',Ypos='%f',Zpos='%f',Apos='%f' WHERE Name='%s'", UserStats[playerid][Password], UserStats[playerid][Admin], UserStats[playerid][Money], UserStats[playerid][Skin], UserStats[playerid][Armor], UserStats[playerid][Health], UserStats[playerid][Xpos], UserStats[playerid][Ypos], UserStats[playerid][Zpos], UserStats[playerid][Apos], UserStats[playerid][Name]);
mysql_query(string);
format(string2, sizeof(string2), "UPDATE Users\n SET Interior'%d', VWorld='%d' WHERE Name='%s'", UserStats[playerid][Interior], UserStats[playerid][VWorld]);
mysql_query(string2);