Saving stats with mysql
#1

Hi, so I got a prob with a stats saving function with mysql, here's the code: http://pastebin.com/PRcQtD27

Everything in the first query works properly but in the second query shit gets mixed up. If you wonder why I have two of them, it's because I got an error for having a too long query bla, lol.

This is how it saves when I register(defaults):
DriversLicense = 0
Job = -1
HouseID = 15000
Bank = 0

It supposed to save like this:
DriversLicense: 1
Job: 0
HouseID: -1
Bank: 15000

mysql logs:
mysql_query("UPDATE Accounts SET Admin = 0,Money = 0,Rank = 'Civilian',Level = 1,Banned = 0,BanReason = '',Carslots = 1,Faction = 0,Skin = 83,Health = '80.000000',Armour = '0.000000',GroupID = 0,FactionPermission = 0,FirstLogin = 0,Origin = 'asd',Sex = 1,Age = 15,Jailed = 0,JailTime = 0,Renting = 0,Cars = 0,Phone = 28638,Hour = 0,Minute = 0,Second = 2,cX = 0.000000,cY = 0.000000,cZ = 0.000000,Interior = 0,VW = 0, WalkieTalkie = 0,Frequency = 0,KnowledgePoints = 0 WHERE Name='Craig_Collint'"); Return: 1

mysql_query("UPDATE Accounts SET DriversLicense = 0,Job = -1,HouseID = 15000 ,Bank = 0 WHERE Name='Craig_Collint'"); Return: 1

Sorry if I explained shitty, and lemme know if there's anything you need to know.
Reply
#2

Did you try making two stocks instead of one? I mean so you dont have both queries in the same function.
Reply
#3

Quote:
Originally Posted by K3lroy
Did you try making two stocks instead of one? I mean so you dont have both queries in the same function.
That wouldnt even make any difference, would it? :S

Anyone else got any idea of how to fix dis?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)