Is this the right way to show the float number within the MySQL Database?
if ($a == "balance") {
$querys= "SELECT balance FROM users WHERE Username='$user'";
$results= mysql_query($querys);
$rows = mysql_fetch_row($results);
$bfloat = (float)$rows['balance'];
echo $bfloat;
}
in the MySQL database the column name balanace
is float
and as example at the current user the value is 1.73
. So its answer would be 1.73