SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 10/04/2010, 08:45 PM   #1
Ozz
Big Clucker
 
Join Date: Mar 2008
Posts: 75
Reputation: 0
Default Saving stats with mysql

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.
Ozz is offline  
Old 10/04/2010, 11:24 PM   #2
K3lroy
Little Clucker
 
K3lroy's Avatar
 
Join Date: Jan 2008
Location: o1WrpRFJlig=
Posts: 5
Reputation: 0
Default Re: Saving stats with mysql

Did you try making two stocks instead of one? I mean so you dont have both queries in the same function.
K3lroy is offline  
Old 11/04/2010, 10:26 AM   #3
Ozz
Big Clucker
 
Join Date: Mar 2008
Posts: 75
Reputation: 0
Default Re: Saving stats with mysql

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?
Ozz is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving player stats? Torran Help Archive 20 11/03/2010 10:33 AM
Stats not saving on logout/login acade Help Archive 20 13/12/2009 04:40 PM
Again, a problem with stats saving SpiderPork Help Archive 0 30/04/2009 02:57 PM


All times are GMT. The time now is 12:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.