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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.