10-18-2008, 09:35 AM
|
#1 (permalink)
|
|
The Visitor
Join Date: Oct 2008
Posts: 2
Thanks: 0
|
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.' '. $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?
|
|
|
|