'LinKin Posted February 16, 2014 Posted February 16, 2014 Hi, How can I save a float number (xx.xx) in a SQL database? (The default of MTA) Thanks. Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Castillo Posted February 16, 2014 Posted February 16, 2014 You can create the column as string. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Moderators Citizen Posted February 16, 2014 Moderators Posted February 16, 2014 According to this doc, it should be possible to store float numbers in columns of type REAL. Never heard of it untill now though. If it doesn't work, then use the solidsnake's solution . The rEvolution is coming ...
Bonsai Posted February 17, 2014 Posted February 17, 2014 Another solution might be, to multiply by 100 to get rid of decimals (assuming there are 2) before saving and dividing by 100 when working with it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now