Hi,
Im trying to enter a value into my database but for some reason when the value is above 1000 it enters 0.00.
This is the code:
mysql_select_db($database_rince, $rince);
$result1 = mysql_query ("SELECT rate FROM rw_exchange_rates WHERE currency = '".$_POST['i_currency']."'");
$myrow1 = mysql_fetch_array ($result1);
$result2 = mysql_query ("SELECT rate FROM rw_exchange_rates WHERE currency = 'GBP'");
$myrow2 = mysql_fetch_array ($result2);
$from = $myrow1['rate'];
$to = $myrow2['rate'];
$price = $_POST['i_price'];
$GBP = number_format(($price/$from)*$to,2);
$pkval = $tNG->getColumnValue('i_id');
mysql_select_db($database_rince, $rince);
$update_price = "UPDATE rw_dress_listing SET i_price_gbp = ".$GBP." WHERE i_id = ".$pkval;
$update_price = mysql_query($update_price);
i_price_gbp is decimal (10,2)
there are another 2 decimal rows that have (10,2) and they are fine. Just that one for some reason. Any ideas?
Thanks allot!
Danny