从特定行获取求和值

I have this:

$result = mysqli_query($mysqli, "SELECT balance FROM " . MYSQLBTCTABLE . " WHERE address='" . $_POST['address'] . "' LIMIT 1");
while($row = mysqli_fetch_assoc($result)) {
    $balance = $row['balance'];

echo "<font style='font-weight:bold;'>Your current balance is: </font><br/>";
printf("%0.8f", ($balance / 100000000));

but it gets only the last value I need to find all balances from that address and sum them in total for the $balance.

Remove limit 1 and do the sum

        $result = mysqli_query($mysqli, "SELECT balance FROM " . MYSQLBTCTABLE . " WHERE      
        address='" . $_POST['address'] . "' ");
        $balance = 0;
        while($row = mysqli_fetch_assoc($result)) {
           $balance += $row['balance'];
        echo "<font style='font-weight:bold;'>Your current balance is: </font><br/>";
        printf("%0.8f", ($balance / 100000000));

Use

$balance += $row['balance'];

Use agregation:

$result = mysqli_query($mysqli, "SELECT sum(balance) FROM " . MYSQLBTCTABLE . " WHERE address='" . $_POST['address'] . "' GROUP BY address");

Remove the LIMIT out of the query and add SUM

$result = mysqli_query($mysqli, "SELECT SUM(balance) as totalBalance FROM " . MYSQLBTCTABLE . " WHERE address='" . $_POST['address'] . "'");
$row = mysqli_fetch_assoc($result);
$balance = $row['totalBalance'];

echo "<font style='font-weight:bold;'>Your current balance is: </font><br/>";
printf("%0.8f", ($balance / 100000000));

First of all,instead :

$balance = $row['balance'];

use:

$balance += $row['balance'];

Furthermore, get rid of the "LIMIT 1" constraint