mysql_query("update users set balance=balance+'$pwbalance'-'$totalprice' where memberid='$memberid' and (balance+'$pwbalance'-'$totalprice')>=0")or die(mysql_error());
$count=mysql_affected_rows();
When I echo $pwbalance, it is 40.00; when I echo $totalprice, it is 40; So there should be one record to be updated. However, when I echo $count, I get 0. What's wrong?