$unpaid1="SELECT t.id, t.year, t.property_id, COALESCE(t.amount,0) AS amount FROM tax_amount t WHERE t.status = 'unpaid' ORDER BY t.year";
$resultpropertyunpaid1 = $db->query($unpaid1);
while($row = $resultpropertyunpaid1->fetch_assoc()){
$PropertyUnpaid1 = $row['unpaid'];
}
When I'm making a new property and put the amount the error will show but after I paid the total amount the error will not show.