PDA

View Full Version : mysql saving


Jack_Leslie
07/07/2014, 02:49 AM
For some reason my MySQL isn't saving. This is what I've got:


forward SaveFactionData(factionid);
public SaveFactionData(factionid)
{
mysql_format(Mysql_factions, szQuery, sizeof(szQuery), "UPDATE `factions` SET Created='%d', FactionName='%e', FactionType='%d', hqX='%f', hqY='%f', hqZ='%f', hqInterior='%d', hqWorld='%d'",\
FactionData[factionid][Created], FactionData[factionid][FactionName], FactionData[factionid][FactionType], FactionData[factionid][hqX], FactionData[factionid][hqY], FactionData[factionid][hqZ], FactionData[factionid][hqInterior], FactionData[factionid][hqWorld]);

mysql_format(Mysql_factions, szQuery, sizeof(szQuery), "%s, lockerX='%f', lockerZ='%f', lockerY='%f', lockerInterior='%d', lockerWorld='%d'",\
szQuery, FactionData[factionid][lockerX], FactionData[factionid][lockerY], FactionData[factionid][lockerZ], FactionData[factionid][lockerInterior], FactionData[factionid][lockerWorld]);

mysql_format(Mysql_factions, szQuery, sizeof(szQuery), "%s, Rank1='%e', Rank2='%e', Rank3='%e', Rank4='%e', Rank5='%e', Rank6='%e'",\
szQuery, FactionData[factionid][Rank1], FactionData[factionid][Rank2], FactionData[factionid][Rank3], FactionData[factionid][Rank4], FactionData[factionid][Rank5], FactionData[factionid][Rank6]);

mysql_format(Mysql_factions, szQuery, sizeof(szQuery), "%s, Division1='%e', Division2='%e', Division3='%e', Division4='%e', Division5='%e', Division6='%e' WHERE FactionName='%e'",\
szQuery, FactionData[factionid][Division1], FactionData[factionid][Division2], FactionData[factionid][Division3], FactionData[factionid][Division4], FactionData[factionid][Division5], FactionData[factionid][Division6], FactionData[factionid][FactionName]);

mysql_tquery(Mysql_factions, szQuery, "", "");
return 1;
}


Mysql log:

[13:13:36] [DEBUG] mysql_format - connection: 1, len: 2056, format: "UPDATE `factions` SET Created='%d', FactionName='%e', FactionType='%d', hqX='%f', hqY='%f', hqZ='%f', hqInterior='%d', hqWorld='..."
[13:13:36] [DEBUG] mysql_format - connection: 1, len: 2056, format: "%s, lockerX='%f', lockerZ='%f', lockerY='%f', lockerInterior='%d', lockerWorld='%d'"
[13:13:36] [DEBUG] mysql_format - connection: 1, len: 2056, format: "%s, Rank1='%e', Rank2='%e', Rank3='%e', Rank4='%e', Rank5='%e', Rank6='%e'"
[13:13:36] [DEBUG] mysql_format - connection: 1, len: 2056, format: "%s, Division1='%e', Division2='%e', Division3='%e', Division4='%e', Division5='%e', Division6='%e' WHERE FactionName='%e'"
[13:13:36] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `factions` SET Created='1', FactionName='Sheriff\'s Depar", callback: "(null)", format: "(null)"
[13:13:36] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[13:13:36] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 352.568 milliseconds
[13:13:36] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving


See how the tquery stops halfway through FactionName, and then I check the table and the data doesn't actually save.