 <?php
include('db.php');
 $sql="select * from customer_statement where amount<0 ";
 $query= $db ->query($sql);
 while($row=$query ->fetch_array()){
	 
	$amount=$row['amount']; 
	echo $id=$row['id']; 
	echo "<br>"; 
	 
	 $new_amount=-($amount);
	 
	 $update="update customer_statement set amount=$new_amount where id='$id' ";
	 $update_query= $db ->query($update);
	 
 }  
?>



 