'LinKin Posted February 16, 2014 Share Posted February 16, 2014 Hi, How can I save a float number (xx.xx) in a SQL database? (The default of MTA) Thanks. Link to comment
Castillo Posted February 16, 2014 Share Posted February 16, 2014 You can create the column as string. Link to comment
Moderators Citizen Posted February 16, 2014 Moderators Share 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 . Link to comment
Bonsai Posted February 17, 2014 Share 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. Link to comment
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