Jump to content

string to float


x_maras

Recommended Posts

Hi,

 

I am inserting some numbers, which I get from the url, into a database.

In the database the type of these fields are both "float(11,7)".

 

My problem is that the number changes a bit when it goes to the database.

It changes in its last digit but it is important for me even this digit...

 

here I ve got an example of the numbers

 

40.6366335  22.9522282 (these are two numbers that I get from the url)

 

40.6366348  22.9522285 (and these are the same numbers stored in the database)

 

Is there a way to have in the database the first numbers?

 

Thanks,

 

Dinos

Link to comment
https://forums.phpfreaks.com/topic/199266-string-to-float/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.