When I send a fractional number like "1234.56" to the database (data format INT ), it becomes 1235 . Tell me what you need to change?

    3 answers 3

    For this, special data types float, double ... are provided.
    Specifically, in your case the type float is most likely more suitable.

      Read here: data types of columns .

        Change int, for example, to varchar. :)

        • one
          It is necessary to change to float, and not to varchar ... In extreme cases, to double (if this makes sense, of course). - Zowie
        • Well, I knowingly gave a reference, everything is described there) - Palmervan
        • Palmervan you this to me? O_o - Zowie
        • AlexWindHope to the article remembered the rzhak when he first started working with php and mysql put on the field varchar limited to 30 and wrote there the password in md5. 2 o'clock llamal head why I can`t log in))) - Palmervan
        • I didn’t have such a thing :) I remember once I didn’t know what kind of strange quotes I took in the html page ... I figured out 2 days later when I started <b> to teach </ b> (Dada, I was really so sad that I started to teach and even taught history :)), well, the reason was utf + bom .. Now I remembered this bom for the rest of my life :) How many nerves I have once ruined, so much ... <br> PS: sorry for offtopic :) </ small> - Zowie