Jump to content

Field Type problem


SirChick

Recommended Posts

$DecimalRemovalStrength = 2.4244;
$addstrength = "UPDATE userregistration SET Strength=Strength+'$DecimalRemovalStrength' WHERE UserID='{$_SESSION['Current_User']}'";
				$resultresult = mysql_query($addstrength) or die(mysql_error());				
			If (mysql_affected_rows() == 0)					{
				die('Error ID 0001, contact admin on the Civilian forums immediatly about this error!');
				}

 

This is what i put to test and in my database it has : 2

 

I don't think its a mysql issue but staff moved the the thread here. I think its my apache but see what you make of it.. ill try var char anyway to see what happens.

 

Link to comment
https://forums.phpfreaks.com/topic/72786-field-type-problem/#findComment-367095
Share on other sites

Hi

 

try removing the ' ' around $DecimalRemovalStrength...

 

so

$DecimalRemovalStrength = 2.4244;
$addstrength = "UPDATE userregistration SET Strength=Strength+$DecimalRemovalStrength WHERE UserID='{$_SESSION['Current_User']}'";
				$resultresult = mysql_query($addstrength) or die(mysql_error());				
			If (mysql_affected_rows() == 0)					{
				die('Error ID 0001, contact admin on the Civilian forums immediatly about this error!');
				}

 

cheers,

tdw

Link to comment
https://forums.phpfreaks.com/topic/72786-field-type-problem/#findComment-367097
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.