<?php
	include("include/db.php");
	
    $root_id=$_POST["root_id"];
    $query="select * from registration inner join wallet_balance on registration.unique_user_id=wallet_balance.balance_user_id where registration.unique_user_id='$root_id'";
    $result=mysqli_query($conn,$query);
    $count=mysqli_num_rows($result);
    if($count >0)
    {
		while($rw=mysqli_fetch_array($result))
		{
		   echo $rw['user_name']. '-' .$rw['total_balance'];
		}
    }
	else
	{
		echo '2';
	}
?>



 