TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   float problem (http://www.talkphp.com/absolute-beginners/3495-float-problem.html)

abs0lut 10-18-2008 09:35 AM

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?


All times are GMT. The time now is 11:08 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0