I have problem with mysql, i have query like these
SELECT sum(Qty) AS Qty FROM sap_rekap_bc23
INNER JOIN masterunit_sap ON masterunit_sap.unit = sap_rekap_bc23.Unit WHERE Qty>0 AND invno='T62TJ92013'
GROUP BY HS_Code,HS_Desc,unit_tpb,Curr,Price,invno
And the result show up
Qty = 3144.6
But when i try insert to another table with my code (on PHP)
$qryuraian = "SELECT sum(Qty) AS Qty FROM sap_rekap_bc23
INNER JOIN masterunit_sap ON masterunit_sap.unit = sap_rekap_bc23.Unit
WHERE Qty>0 AND invno='T62TJ92013' GROUP BY HS_Code,HS_Desc,unit_tpb,Curr,Price,invno";
$listuraian = mysql_query($qryuraian,$conn);
while($item=mysql_fetch_array($listuraian))
{
$inserttmp = "INSERT INTO tmp_sap_rekap_bc23 (Qty)
VALUES ('".$item['Qty']."')";
//mysql_query($inserttmp,$connweb);
}
The Result my Qty
on tmp_sap_rekap_bc23
show 3145
. Why my data instant became rounded?? even tough my table tmp_sap_rekap_bc23
on field Qty
was type Double
??? Any ideas??