|
Posted by James_sgp on 06/19/07 06:21
Hi, I`m trying to write code that will check the contents of a
variable ($distance) to see if it contains the value 'ft'. If it is
true, I need it to divide the valiable $max_depth by 3.28; then write
the variable into a MYSQL database. I have tried several different
ways, but it seems that only the original (not divided by 3.28) value
keeps getting put into the database. I`m using the line below to do
the checking:
if(strcmp($distance,"ft")==0) $max_depth=$max_depth/3.28;
Does it matter where I put this line? I have it just before the
INSERT command.
Navigation:
[Reply to this message]
|