Thread: float problem
View Single Post
Old 10-18-2008, 09:35 AM   #1 (permalink)
abs0lut
The Visitor
Newcomer 
 
Join Date: Oct 2008
Posts: 2
Thanks: 0
abs0lut is on a distinguished road
Default float problem

Code:
<?php
include 'conn.php'; 
$post=$_GET['post'];

$query= mysql_query("SELECT min(cost) as mincost, iqid, warranty FROM cost WHERE postid='$post' GROUP BY iqid, warranty") or die(mysql_error());
while($row = mysql_fetch_array($query)){
$iqid=$row['iqid'];
$mincost=$row['mincost'];

$doup = mysql_query("UPDATE cost SET lowest='yes' WHERE cost=$mincost AND postid=$post") or die(mysql_error());
	if($doup){
	echo $mincost.'&nbsp;&nbsp;'. $iqid.'<br>';
	}
}
?>
if the lowest cost is float, other lowest cost are not updating.
but if the cost is integer, it is ok.
could you please help me?
abs0lut is offline  
Reply With Quote