Monday, 2 September 2013

Cannot update field of type double in mysql

Cannot update field of type double in mysql

I've a mysql table with following fields:
Hid Hname Lat Lngt Phone
--- ----- --- ---- -----
Integer varchar double(10,7) double(10,7) varchar
When I try to update the fields 'Hname','Lat', 'Longt' & 'Phone', the
fields 'Lat' and 'Longt' (of type double )are not getting updated. (Hname
and Phone gets updated correctly) Can anyone help me to figure out the
problem? Here goes the PHP code segment :
$i=0;
foreach($chk as $A)
{
echo $lat[$i]; echo $lon[$i]; //It displays the correct values
mysql_query("update health_block set Lat=$lat[$i], Hname='$A',
Longt=$lon[$i], Phone='$phn[$i]' where Hid=$chk1[$i]",$con);
$i++;
}

No comments:

Post a Comment