---- It appears that the ----
`"$query_upd = 'UPDATE registry SET net_worth = "'.$new_value.'" WHERE id = "'.$curr_id.'" LIMIT 1;';"`
is not updating the DB with the new value. All of the other codes work and echoes fine.
<?php
$sql = "SELECT id, net_worth FROM registry WHERE active = '1'";
$result = $conn->query($sql);
echo '<div class="row" style="margin-top:20px">';
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$new_value = $row['net_worth'] * 1.25;
echo $row["net_worth"];
echo ' | ';
echo $new_value;
echo ' ';
$curr_id = $row['id'];
$query_upd = 'UPDATE registry SET net_worth = "'.$new_value.'" WHERE id = "'.$curr_id.'" LIMIT 1;';
$upd = mysqli_query($link, $query_upd);
echo "Record ".$curr_id." Updated";
// ----- Net Worth
echo '<p>';
echo '<span style="color:#29cc6a">NET WORTH: '.$curr_id.'</span>';
echo '<br>';
$fmt = new NumberFormatter( 'en_US', NumberFormatter::CURRENCY );
echo '<span style="margin-top:-20px;font-size:60px;">'.$fmt->formatCurrency($row["net_worth"], "JPY").'</span>';
echo '<br>Yuanbao 元寶';
echo '</p>';
echo '<hr style="border-top:1px, solid, #333">';
}
echo '</div>';
} else {
echo "0 results";
}
$conn->close();
?>