Jump to content

float problem


abs0lut

Recommended Posts

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.