<?php
 include("db.php");
 
 $control_sql="select * from customerbalance";
 $control_query=$db ->query($control_sql);
 while($control_row=$control_query ->fetch_array()){
 
    $currencyId=$control_row['currencyId'];
 
    if($currencyId==1){
	
	 $update_sql="update customerbalance set currencyId='2' where currencyId='1'";
	 $update_query= $db ->query($update_sql);
	}
 
  if($currencyId==2){
	
	 $update_sql="update customerbalance set currencyId='1' where currencyId='2'";
	 $update_query= $db ->query($update_sql);
	}
 
  if($currencyId==3){
	
	 $update_sql="update customerbalance set currencyId='5' where currencyId='3'";
	 $update_query= $db ->query($update_sql);
	}
 
  if($currencyId==4){
	
	 $update_sql="update customerbalance set currencyId='4' where currencyId='4'";
	 $update_query= $db ->query($update_sql);
	}
 
  if($currencyId==5){
	
	 $update_sql="update customerbalance set currencyId='3' where currencyId='5'";
	 $update_query= $db ->query($update_sql);
	}
 
 
 
 
 }





?>