Jump to content

Format of number input


EchoFool

Recommended Posts

I am having a wierd problem with my script... i have a number im inserting to my field (data type bigint(20) )

 

The number is for example 45.52682

 

But in the database it just sticks to a full integer and no decimal places.

<?php
$Gain = 45.52682;

$Update = mysql_query("UPDATE users SET Str=Str+'$Gain' WHERE ID='{$_SESSION['UserID']}'")
	Or die(mysql_error());
?>

 

What am i doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/123024-format-of-number-input/
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.