Solved MySQL and float

Discussion in 'Rust Development' started by Шалун, Jun 5, 2016.

  1. Hi!

    I want save float data in my DB.
    For example: i writing 0,15, but in DB saving 1
    I trying use:
    "UPDATE table_name SET my_param = 0.15 WHERE user = 1"
    "UPDATE table_name SET my_param = '0.15' WHERE user = 1"
    "UPDATE table_name SET my_param = '0,15' WHERE user = 1"
    But all not working. DB saved as '1'
     
  2. Well, did you create your table with float/double precision/real types?
     
  3. float type
    decimal 3
     
  4. Fixed.

    I writen incorret sql query ;d