abs0lut Posted October 18, 2008 Share Posted October 18, 2008 <?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? Link to comment https://forums.phpfreaks.com/topic/128943-float-problem/ Share on other sites More sharing options...
teng84 Posted October 18, 2008 Share Posted October 18, 2008 WHERE cost=$mincost AND postid=$post" me id ka na bakit gagamit ka pa ng cost ? you already have your ID "postid" why do you need to use cost as identifier i believe postid is unique in this case Link to comment https://forums.phpfreaks.com/topic/128943-float-problem/#findComment-668519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.